169
if d.VersionState.Status == enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED ||
170
d.VersionState.Status == enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE {
172
>
// Set up drainage info for monitoring
173
>
d.VersionState.DrainageInfo = &deploymentpb.VersionDrainageInfo{
174
>
Status: enumspb.VERSION_DRAINAGE_STATUS_DRAINING,
175
>
LastChangedTime: timestamppb.New(workflow.Now(ctx)),
176
>
LastCheckedTime: timestamppb.New(workflow.Now(ctx)),
177
>
}
178
>
179
>
// Use existing function to update status and sync to task queues
180
>
d.updateVersionStatusAfterDrainageStatusChange(ctx, enumspb.VERSION_DRAINAGE_STATUS_DRAINING)
181
>
d.syncSummary(ctx) // Notify parent deployment workflow of the status change
182
>
d.setStateChanged() // Trigger CaN
183
>
}
184
})
185
}