Class: Rjob::Scripts::ReturnJobExecution
- Inherits:
-
RedisScript
- Object
- RedisScript
- Rjob::Scripts::ReturnJobExecution
- Defined in:
- lib/rjob/scripts/return_job_execution.rb
Instance Attribute Summary
Attributes inherited from RedisScript
Instance Method Summary collapse
Methods inherited from RedisScript
Instance Method Details
#arg_params ⇒ Object
4 5 6 |
# File 'lib/rjob/scripts/return_job_execution.rb', line 4 def arg_params i(job bucket prefix) end |
#lua_script ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rjob/scripts/return_job_execution.rb', line 8 def lua_script " local job = ARGV[1]\n local bucket = ARGV[2]\n local prefix = ARGV[3]\n local r = redis\n r.call('lrem', prefix .. ':jobs:' .. bucket .. ':working', 1, job)\n r.call('rpush', prefix .. ':jobs:' .. bucket, job)\n return 1\n LUA\nend\n" |