mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-31 05:06:41 +00:00
fix: task registry
This commit is contained in:
parent
aa85b6963b
commit
79ef4c9310
|
@ -1,12 +1,11 @@
|
|||
import re
|
||||
import subprocess
|
||||
|
||||
from selfprivacy_api.utils.huey import huey
|
||||
|
||||
from selfprivacy_api.jobs import JobStatus, Jobs, Job
|
||||
|
||||
|
||||
# from selfprivacy_api.utils.huey import huey
|
||||
|
||||
|
||||
COMPLETED_WITH_ERROR = "Completed with an error"
|
||||
RESULT_WAS_NOT_FOUND_ERROR = "We are sorry, result was not found :("
|
||||
CLEAR_COMPLETED = "Сleaning completed."
|
||||
|
@ -83,6 +82,7 @@ def get_dead_packages(output):
|
|||
return dead, percent
|
||||
|
||||
|
||||
@huey.task()
|
||||
def calculate_and_clear_dead_packages(job: Jobs):
|
||||
Jobs.update(
|
||||
job=job,
|
||||
|
|
|
@ -2,4 +2,4 @@ from selfprivacy_api.utils.huey import huey
|
|||
from selfprivacy_api.jobs.test import test_job
|
||||
from selfprivacy_api.restic_controller.tasks import *
|
||||
from selfprivacy_api.services.generic_service_mover import move_service
|
||||
from selfprivacy_api.jobs.nix_collect_garbage import nix_collect_garbage
|
||||
from selfprivacy_api.jobs.nix_collect_garbage import calculate_and_clear_dead_packages
|
||||
|
|
Loading…
Reference in a new issue