Skip to content

Commit a5570e2

Browse files
philippthunjohha
andauthored
Update lib/cloud_controller/diego/tasks_sync.rb
Co-authored-by: Johannes Haass <johannes.haass@sap.com>
1 parent a45adfe commit a5570e2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/cloud_controller/diego/tasks_sync.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def formatted_backtrace_from_error(error)
7878
def update_missing_diego_tasks(to_update)
7979
to_update.each do |task_guid|
8080
workpool.submit(task_guid) do |guid|
81-
diego_task_missing = bbs_task_client.fetch_task(guid).nil?
82-
if diego_task_missing
81+
if bbs_task_client.fetch_task(guid).nil?
8382
# Mark the CC task as failed. Don't update tasks that are already in a terminal state.
8483
task = TaskModel.where(guid:).exclude(state: [TaskModel::FAILED_STATE, TaskModel::SUCCEEDED_STATE]).first
8584
task&.update(state: TaskModel::FAILED_STATE, failure_reason: BULKER_TASK_FAILURE) # invoke model's update method to create an event

0 commit comments

Comments
 (0)