@@ -10,7 +10,7 @@ local cjson_decode = cjson.decode
10
10
11
11
12
12
13
- -- Object for interacting with jobs in different states in the queue. Not meant to be
13
+ -- Object for interacting with jobs in different states in the queue. Not meant to be
14
14
-- instantiated directly, it's accessed via queue.jobs.
15
15
local _queue_jobs = {}
16
16
local _queue_jobs_mt = { __index = _queue_jobs }
34
34
function _queue_jobs .scheduled (self , start , count )
35
35
return self .client :call (" jobs" , " scheduled" , self .name , start or 0 , count or 25 )
36
36
end
37
-
37
+
38
38
39
39
function _queue_jobs .depends (self , start , count )
40
40
return self .client :call (" jobs" , " depends" , self .name , start or 0 , count or 25 )
@@ -52,7 +52,7 @@ local _M = {
52
52
}
53
53
54
54
55
- local mt = {
55
+ local mt = {
56
56
__index = function (t , k )
57
57
if k == " heartbeat" then
58
58
return _M .get_config (k )
@@ -74,7 +74,7 @@ local mt = {
74
74
75
75
76
76
function _M .new (name , client )
77
- local self = setmetatable ({
77
+ local self = setmetatable ({
78
78
name = name ,
79
79
client = client ,
80
80
worker_name = client .worker_name ,
@@ -112,7 +112,7 @@ function _M.pause(self, options)
112
112
local client = self .client
113
113
local res , err
114
114
res , err = client :call (" pause" , self .name )
115
-
115
+
116
116
if options .stop_jobs then
117
117
res , err = client :call (" timeout" , self .jobs :running (0 , - 1 ))
118
118
end
@@ -129,11 +129,11 @@ end
129
129
function _M .put (self , klass , data , options )
130
130
if not options then options = {} end
131
131
return self .client :call (
132
- " put" ,
133
- self .worker_name ,
134
- self .name ,
135
- options .jid or self .client :generate_jid (),
136
- klass ,
132
+ " put" ,
133
+ self .worker_name ,
134
+ self .name ,
135
+ options .jid or self .client :generate_jid (),
136
+ klass ,
137
137
cjson_encode (data or {}),
138
138
options .delay or 0 ,
139
139
" priority" , options .priority or 0 ,
0 commit comments