Finish autoscaling diagnostics and document pilot rollout
This commit is contained in:
@@ -500,6 +500,14 @@ async function processJob(job: Job, eligibility: (job: Job) => string | null) {
|
||||
}
|
||||
if (!operation || operation.state === 'unknown') { hold(job, 'Agent result is unknown. Reconciling the original operation; no replacement or repeated command will be sent.'); return; }
|
||||
if (operation.state === 'failed') {
|
||||
if (job.action === 'destroy' && scalingIntent(job.id) && (operation.result as { autoscalingInvalidated?: boolean } | null)?.autoscalingInvalidated === true) {
|
||||
db().transaction(() => {
|
||||
db().prepare("UPDATE server_deployments SET state='cancelled',stage='Automatic removal withdrawn; new empty interval required',finished_at=?,error=NULL WHERE id=?")
|
||||
.run(new Date().toISOString(), job.id);
|
||||
recordProgress(job.id, { blocker: null, event: { kind: 'outcome', message: 'Automatic removal was invalidated before mutation. A new decision and empty interval are required.', details: { state: 'cancelled' } } });
|
||||
})();
|
||||
return;
|
||||
}
|
||||
if (migration) {
|
||||
if (Date.now() - Date.parse(operation.updatedAt) >= 60_000) {
|
||||
db().transaction(() => {
|
||||
|
||||
Reference in New Issue
Block a user