mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-31 13:16:38 +00:00
fix: tests, jobs.error return
This commit is contained in:
parent
70a498d0e5
commit
98eef8d08e
|
@ -43,7 +43,7 @@ def parse_line(line):
|
||||||
|
|
||||||
if match is None:
|
if match is None:
|
||||||
return (
|
return (
|
||||||
JobStatus.FINISHED,
|
JobStatus.ERROR,
|
||||||
100,
|
100,
|
||||||
COMPLETED_WITH_ERROR,
|
COMPLETED_WITH_ERROR,
|
||||||
RESULT_WAS_NOT_FOUND_ERROR,
|
RESULT_WAS_NOT_FOUND_ERROR,
|
||||||
|
@ -98,7 +98,7 @@ def get_dead_packages(output):
|
||||||
|
|
||||||
|
|
||||||
@huey.task()
|
@huey.task()
|
||||||
def calculate_and_clear_dead_packages(job: Jobs):
|
def calculate_and_clear_dead_packages(job: Job):
|
||||||
Jobs.update(
|
Jobs.update(
|
||||||
job=Job,
|
job=Job,
|
||||||
status=JobStatus.RUNNING,
|
status=JobStatus.RUNNING,
|
||||||
|
|
|
@ -86,7 +86,7 @@ def test_parse_line(job_reset):
|
||||||
def test_parse_line_with_blank_line(job_reset):
|
def test_parse_line_with_blank_line(job_reset):
|
||||||
txt = ""
|
txt = ""
|
||||||
output = (
|
output = (
|
||||||
JobStatus.FINISHED,
|
JobStatus.ERROR,
|
||||||
100,
|
100,
|
||||||
COMPLETED_WITH_ERROR,
|
COMPLETED_WITH_ERROR,
|
||||||
RESULT_WAS_NOT_FOUND_ERROR,
|
RESULT_WAS_NOT_FOUND_ERROR,
|
||||||
|
|
Loading…
Reference in a new issue