{"definition_raw":"---\nid: mc-prune-ticket-events\nname: MC nightly ticket_events archive + prune\nschedule: \"30 3 * * *\"\nenabled: true\ncriticality: medium\nrun_as: script\ncommand: python3 ~/workspace/mission-control/scripts/prune_ticket_events.py\ndescription: Move events >7 days old for terminal (done/cancelled) tickets into\n  ticket_events_archive, then DELETE from live table. Keeps ticket_events\n  hot-table small. MC-2673.\nruntime_profile: direct_python\n---\n**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because the command chain never invokes the `claude` CLI or any LLM API \u2014 pure-infra task; scheduler provider env injection is a no-op (MC-4942 U12 sweep).\n\n","id":"mc-prune-ticket-events","last_run":{"duration_s":0.613696,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/413401.log","output":"2026-06-13T01:31:20.917068+00:00 prune_ticket_events: archived=1 deleted=1 (eligible=1)\n","started_at":"2026-06-13T03:31:20.845375+02:00","status":"completed"},"next_run":"2026-06-14 03:30","next_run_iso":"2026-06-14T03:30:00+02:00","runs":[{"duration_s":0.613696,"finished_at":"2026-06-13T03:31:21.461802+02:00","id":413401,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/413401.log","output":"2026-06-13T01:31:20.917068+00:00 prune_ticket_events: archived=1 deleted=1 (eligible=1)\n","started_at":"2026-06-13T03:31:20.845375+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.731527,"finished_at":"2026-06-12T03:31:16.647311+02:00","id":409235,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/409235.log","output":"2026-06-12T01:31:15.985912+00:00 prune_ticket_events: archived=8 deleted=8 (eligible=8)\n","started_at":"2026-06-12T03:31:15.912919+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.643378,"finished_at":"2026-06-11T03:31:13.997584+02:00","id":404872,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/404872.log","output":"2026-06-11T01:31:13.426072+00:00 prune_ticket_events: archived=4 deleted=4 (eligible=4)\n","started_at":"2026-06-11T03:31:13.351277+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.634923,"finished_at":"2026-06-10T03:31:07.660085+02:00","id":400596,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/400596.log","output":"2026-06-10T01:31:07.094364+00:00 prune_ticket_events: archived=9 deleted=9 (eligible=9)\n","started_at":"2026-06-10T03:31:07.023007+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.53555,"finished_at":"2026-06-09T03:31:12.882615+02:00","id":396359,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/396359.log","output":"2026-06-09T01:31:12.425158+00:00 prune_ticket_events: archived=3 deleted=3 (eligible=3)\n","started_at":"2026-06-09T03:31:12.344377+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.656095,"finished_at":"2026-06-08T03:30:37.950005+02:00","id":392267,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/392267.log","output":"2026-06-08T01:30:37.366223+00:00 prune_ticket_events: archived=3 deleted=3 (eligible=3)\n","started_at":"2026-06-08T03:30:37.291785+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.497797,"finished_at":"2026-06-07T03:30:42.774846+02:00","id":387842,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/387842.log","output":"2026-06-07T01:30:42.333753+00:00 prune_ticket_events: archived=2 deleted=2 (eligible=2)\n","started_at":"2026-06-07T03:30:42.274875+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"},{"duration_s":0.694654,"finished_at":"2026-06-06T03:30:48.790313+02:00","id":383122,"log_path":"/home/lucienne/workspace/logs/task-runs/mc-prune-ticket-events/383122.log","output":"2026-06-06T01:30:48.178537+00:00 prune_ticket_events: archived=52 deleted=52 (eligible=52)\n","started_at":"2026-06-06T03:30:48.093409+02:00","status":"completed","task_id":"mc-prune-ticket-events","task_name":"mc-prune-ticket-events"}],"runs_limit":20,"schedule":"30 3 * * *","schedule_label":{"description":"Daily at 03:30","is_custom":false,"label":"Daily","sort":4,"sort_time":"03:30"},"stats":{"avg_duration":0.6259525,"completed":8,"failed":0,"timeout":0,"total":8},"task":{"_description":"**OVERRIDES runtime profile:** uses `direct_python` (plain Python, no model) because the command chain never invokes the `claude` CLI or any LLM API \u2014 pure-infra task; scheduler provider env injection is a no-op (MC-4942 U12 sweep).","_file":"mc-prune-ticket-events.md","_path":"/home/lucienne/workspace/tasks/mc-prune-ticket-events.md","command":"python3 ~/workspace/mission-control/scripts/prune_ticket_events.py","criticality":"medium","description":"Move events >7 days old for terminal (done/cancelled) tickets into ticket_events_archive, then DELETE from live table. Keeps ticket_events hot-table small. MC-2673.","enabled":true,"id":"mc-prune-ticket-events","name":"MC nightly ticket_events archive + prune","run_as":"script","runtime_profile":"direct_python","schedule":"30 3 * * *"}}
