queue_dispatcher 1.1.14 → 1.1.15
Sign up to get free protection for your applications and to get access to all the features.
@@ -115,7 +115,7 @@ module QueueDispatcher
|
|
115
115
|
|
116
116
|
# Is the task_queue in state config_reload?
|
117
117
|
def reloading_config?
|
118
|
-
acts_as_task_task_queue && acts_as_task_task_queue.
|
118
|
+
acts_as_task_task_queue && acts_as_task_task_queue.reloading_config? && acts_as_task_task_queue.tasks.where(state: 'new').first.id == id
|
119
119
|
end
|
120
120
|
|
121
121
|
|
@@ -215,6 +215,12 @@ module QueueDispatcher
|
|
215
215
|
end
|
216
216
|
|
217
217
|
|
218
|
+
# Return true, if the task_queue is in state 'reloading_config'
|
219
|
+
def reloading_config?
|
220
|
+
pid_running? && state == 'reloading_config'
|
221
|
+
end
|
222
|
+
|
223
|
+
|
218
224
|
# Kill a task_queue
|
219
225
|
def kill
|
220
226
|
Process.kill('HUP', pid) if pid
|