Skip to content

Commit

Permalink
Fix #TBFL - fix task gone missing
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka committed Mar 15, 2024
1 parent 6d0ee73 commit 8cfae71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/foreman_tasks/remote_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def self.batch_trigger(operation, remote_tasks)
end

def update_from_batch_trigger(data, parent = {})
# The ID might get overwritten later, but it is a sane default in case of async
# triggering where we only get an id of a remote parent
self.remote_task_id = self.execution_plan_id
if data['result'] == 'success'
self.remote_task_id = data['task_id']
self.state = 'triggered'
Expand Down

0 comments on commit 8cfae71

Please sign in to comment.