From 318b1aead25bdd066aa5306f1d0d87ac7ce6db80 Mon Sep 17 00:00:00 2001 From: Petr Jasek Date: Fri, 17 Apr 2026 13:57:09 +0200 Subject: [PATCH] planning commands using planning_cli were not registered --- server/planning/commands/delete_spiked_items.py | 4 ++-- server/planning/commands/flag_expired_items.py | 4 ++-- server/planning/commands/purge_expired_locks.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/planning/commands/delete_spiked_items.py b/server/planning/commands/delete_spiked_items.py index 1c0929bd3..7b1a9839b 100644 --- a/server/planning/commands/delete_spiked_items.py +++ b/server/planning/commands/delete_spiked_items.py @@ -20,13 +20,13 @@ from superdesk.lock import lock, unlock, remove_locks from planning.common import WORKFLOW_STATE from planning.events.events_utils import get_recurring_timeline -from .async_cli import planning_cli +from superdesk.commands import cli log_msg_context: ContextVar[str] = ContextVar("log_msg", default="") -@planning_cli.command("planning:delete_spiked") +@cli.command("planning:delete_spiked") async def delete_spiked_items_command(): """ Delete expired spiked `Events` and `Planning` items. diff --git a/server/planning/commands/flag_expired_items.py b/server/planning/commands/flag_expired_items.py index ef023d928..2d2761667 100644 --- a/server/planning/commands/flag_expired_items.py +++ b/server/planning/commands/flag_expired_items.py @@ -13,7 +13,7 @@ from superdesk.celery_task_utils import get_lock_id from superdesk.lock import lock, unlock, remove_locks from superdesk.notification import push_notification -from .async_cli import planning_cli +from superdesk.commands import cli from planning.utils import get_related_planning_for_events_async, get_related_event_ids_for_planning @@ -21,7 +21,7 @@ log_msg_context: ContextVar[str] = ContextVar("log_msg", default="") -@planning_cli.command("planning:flag_expired") +@cli.command("planning:flag_expired") async def flag_expired_items_command(): """ Flag expired `Events` and `Planning` items with `{'expired': True}`. diff --git a/server/planning/commands/purge_expired_locks.py b/server/planning/commands/purge_expired_locks.py index c7ef80498..960c61554 100644 --- a/server/planning/commands/purge_expired_locks.py +++ b/server/planning/commands/purge_expired_locks.py @@ -22,12 +22,12 @@ from planning.utils import get_service, try_cast_object_id from planning.events import EventsAutosaveAsyncService from planning.planning import PlanningAutosaveAsyncService -from .async_cli import planning_cli +from superdesk.commands import cli logger = logging.getLogger(__name__) -@planning_cli.command("planning:purge_expired_locks") +@cli.command("planning:purge_expired_locks") @click.option( "--resource", "-r",