queue_dispatcher 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -337,9 +337,6 @@ module QueueDispatcher
|
|
337
337
|
reload_config task, print_log: print_log
|
338
338
|
end
|
339
339
|
|
340
|
-
# Delete task_queue
|
341
|
-
task_queue.destroy_if_all_done! if task_queue
|
342
|
-
|
343
340
|
# Loop has ended
|
344
341
|
log :msg => "#{name}: TaskQueue has ended!", :print_log => print_log
|
345
342
|
finish_state = 'stopped'
|
@@ -350,12 +347,15 @@ module QueueDispatcher
|
|
350
347
|
puts "Fatal error in method 'run!': #{$!}\n#{backtrace}"
|
351
348
|
task.update_state QueueDispatcher::RcAndMsg.bad_rc("Fatal error: #{$!}") if task
|
352
349
|
cleanup_locks_after_error_for task if task
|
353
|
-
|
350
|
+
task.update_attribute state: 'error' if task && task.state != 'finished'
|
354
351
|
ensure
|
355
352
|
# Reload task and task_queue, to ensure the objects are up to date
|
356
353
|
task_queue = TaskQueue.find_by_id task_queue.id if task_queue
|
357
354
|
task = Task.find_by_id task.id if task
|
358
355
|
|
356
|
+
# Delete task_queue
|
357
|
+
task_queue.destroy_if_all_done! if task_queue
|
358
|
+
|
359
359
|
# Update states of task and task_queue
|
360
360
|
task.update_attributes :state => 'aborted' if task && task.state == 'running'
|
361
361
|
task_queue.update_attributes :state => finish_state, :pid => nil if task_queue
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_dispatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sys-proctable
|