queue_dispatcher 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,8 +63,8 @@ module QueueDispatcher
|
|
63
63
|
end
|
64
64
|
|
65
65
|
|
66
|
-
# This method updates the task state according to the return code of their corresponding command
|
67
|
-
def update_state(rc_and_msg)
|
66
|
+
# This method updates the task state according to the return code of their corresponding command and removes it from the task_queue
|
67
|
+
def update_state(rc_and_msg, remove_from_queue = true)
|
68
68
|
rc = output = error_msg = nil
|
69
69
|
|
70
70
|
if rc_and_msg.is_a?(QueueDispatcher::RcAndMsg)
|
@@ -88,6 +88,10 @@ module QueueDispatcher
|
|
88
88
|
:error_msg => error_msg,
|
89
89
|
:message => output.truncate(10256)
|
90
90
|
end
|
91
|
+
|
92
|
+
self.update_attributes :task_queue_id => nil if remove_from_queue
|
93
|
+
|
94
|
+
rc
|
91
95
|
end
|
92
96
|
|
93
97
|
|