Skip to content

Commit

Permalink
Mark task as active while destroying an ems
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Dec 19, 2017
1 parent c450468 commit d74ee55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,11 @@ def orchestrate_destroy(task_id)
disable! if enabled?

if self.destroy == false
_log.info("Cannot destroy #{self.class.name} with id: #{id}, workers still in progress. Requeuing destroy...")
msg = "Cannot destroy #{self.class.name} with id: #{id}, workers still in progress. Requeuing destroy..."
MiqTask.update_status(task_id, MiqTask::STATE_ACTIVE, MiqTask::STATUS_OK, msg)

_log.info(msg)

self.class.schedule_destroy_queue(id, task_id, 15.seconds.from_now)
else
msg = "#{self.class.name} with id: #{id} destroyed"
Expand Down

0 comments on commit d74ee55

Please sign in to comment.