You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
datamachine_code_cleanup_assert(array( 'datamachine drain --job-id=123', 'datamachine drain --job-id=125' ) === WP_CLI::$runcommands, 'cleanup run --drain drains parent then active child jobs');
1406
+
datamachine_code_cleanup_assert('cleanup-run-123' === ( $scheduled_json['run_id'] ?? '' ), 'cleanup run --drain JSON emits scheduled run id before final status');
1407
+
datamachine_code_cleanup_assert(123 === (int) ( $scheduled_json['job_id'] ?? 0 ), 'cleanup run --drain JSON emits scheduled job id before final status');
1408
+
datamachine_code_cleanup_assert('scheduled' === ( $scheduled_json['drain_state'] ?? '' ), 'cleanup run --drain JSON marks the early scheduled event');
1409
+
datamachine_code_cleanup_assert('cleanup-run-123' === ( $GLOBALS['datamachine_code_cleanup_parent_drain_saw_scheduled_json']['run_id'] ?? '' ), 'cleanup run --drain exposes run id before invoking parent drain');
datamachine_code_cleanup_assert(array( 'datamachine drain --job-id=123' ) === WP_CLI::$runcommands, 'cleanup run --drain drains no-work parent once and does not invent child drains');
1438
+
datamachine_code_cleanup_assert('cleanup-run-123' === ( $no_work_scheduled_json['run_id'] ?? '' ), 'cleanup run --drain no-work JSON emits scheduled run id before draining');
1439
+
datamachine_code_cleanup_assert('cleanup-run-123' === ( $GLOBALS['datamachine_code_cleanup_parent_drain_saw_scheduled_json']['run_id'] ?? '' ), 'cleanup run --drain no-work exposes run id before invoking parent drain');
1428
1440
datamachine_code_cleanup_assert('no_work' === (string) ( $no_work_drained_json['drain']['completion_state'] ?? '' ), 'cleanup run --drain reports no_work instead of successful running state for no-child/no-work parents');
1429
1441
datamachine_code_cleanup_assert(true === (bool) ( $no_work_drained_json['drain']['success'] ?? false ), 'cleanup run --drain succeeds after no-work convergence');
0 commit comments