From 1396311d1d511655914d14bcbd59bb8ea73bc48d Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Tue, 5 Nov 2024 21:24:51 +0100 Subject: [PATCH] Add; test importer task --- archivist/apps/importer/tasks.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 archivist/apps/importer/tasks.py diff --git a/archivist/apps/importer/tasks.py b/archivist/apps/importer/tasks.py new file mode 100644 index 0000000..b2a1386 --- /dev/null +++ b/archivist/apps/importer/tasks.py @@ -0,0 +1,12 @@ +import time + +from celery import shared_task + +@shared_task +def add(x, y): + return x + y + +@shared_task +def wait(x): + time.sleep(x) + return f"Sleeping for {x} seconds" \ No newline at end of file