Skip to content

Commit efece86

Browse files
authored
planning commands using planning_cli were not registered (#2809)
1 parent 4fac91c commit efece86

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

server/planning/commands/delete_spiked_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
from superdesk.lock import lock, unlock, remove_locks
2121
from planning.common import WORKFLOW_STATE
2222
from planning.events.events_utils import get_recurring_timeline
23-
from .async_cli import planning_cli
23+
from superdesk.commands import cli
2424

2525

2626
log_msg_context: ContextVar[str] = ContextVar("log_msg", default="")
2727

2828

29-
@planning_cli.command("planning:delete_spiked")
29+
@cli.command("planning:delete_spiked")
3030
async def delete_spiked_items_command():
3131
"""
3232
Delete expired spiked `Events` and `Planning` items.

server/planning/commands/flag_expired_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
from superdesk.celery_task_utils import get_lock_id
1414
from superdesk.lock import lock, unlock, remove_locks
1515
from superdesk.notification import push_notification
16-
from .async_cli import planning_cli
16+
from superdesk.commands import cli
1717

1818
from planning.utils import get_related_planning_for_events_async, get_related_event_ids_for_planning
1919

2020

2121
log_msg_context: ContextVar[str] = ContextVar("log_msg", default="")
2222

2323

24-
@planning_cli.command("planning:flag_expired")
24+
@cli.command("planning:flag_expired")
2525
async def flag_expired_items_command():
2626
"""
2727
Flag expired `Events` and `Planning` items with `{'expired': True}`.

server/planning/commands/purge_expired_locks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
from planning.utils import get_service, try_cast_object_id
2323
from planning.events import EventsAutosaveAsyncService
2424
from planning.planning import PlanningAutosaveAsyncService
25-
from .async_cli import planning_cli
25+
from superdesk.commands import cli
2626

2727
logger = logging.getLogger(__name__)
2828

2929

30-
@planning_cli.command("planning:purge_expired_locks")
30+
@cli.command("planning:purge_expired_locks")
3131
@click.option(
3232
"--resource",
3333
"-r",

0 commit comments

Comments
 (0)