Skip to content
Snippets Groups Projects
Commit 5d7f6795 authored by vlorentz's avatar vlorentz
Browse files

adm_deposit_reschedule: Fix "can not serialize 'datetime.datetime' object"

Broken by swh-core 0.12.0 (777ea186fa8d31a972ccc15abb7c42297e0a399f)
parent 043b96da
No related branches found
No related tags found
No related merge requests found
...@@ -234,7 +234,7 @@ def adm_deposit_reschedule(ctx, deposit_id): ...@@ -234,7 +234,7 @@ def adm_deposit_reschedule(ctx, deposit_id):
""" """
# to avoid loading too early django namespaces # to avoid loading too early django namespaces
from datetime import datetime import datetime
from swh.deposit.config import ( from swh.deposit.config import (
DEPOSIT_STATUS_LOAD_FAILURE, DEPOSIT_STATUS_LOAD_FAILURE,
...@@ -281,5 +281,7 @@ def adm_deposit_reschedule(ctx, deposit_id): ...@@ -281,5 +281,7 @@ def adm_deposit_reschedule(ctx, deposit_id):
# Schedule back the deposit loading task # Schedule back the deposit loading task
scheduler = APIConfig().scheduler scheduler = APIConfig().scheduler
scheduler.set_status_tasks( scheduler.set_status_tasks(
[task_id], status="next_run_not_scheduled", next_run=datetime.now() [task_id],
status="next_run_not_scheduled",
next_run=datetime.datetime.now(tz=datetime.timezone.utc),
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment