Skip to content
Snippets Groups Projects
Commit 0b237186 authored by Jiří Setnička's avatar Jiří Setnička Committed by Martin Mareš
Browse files

Naplánování jobu se scany vrací job_id

parent 023d057f
No related branches found
No related tags found
1 merge request!94Třídění skenů
...@@ -174,7 +174,7 @@ def handle_create_protocols(the_job: TheJob): ...@@ -174,7 +174,7 @@ def handle_create_protocols(the_job: TheJob):
# #
def schedule_process_scans(contest: db.Contest, site: Optional[db.Place], for_user: db.User, tasks: List[db.Task], in_file_names: List[str]): def schedule_process_scans(contest: db.Contest, site: Optional[db.Place], for_user: db.User, tasks: List[db.Task], in_file_names: List[str]) -> int:
place = site or contest.place place = site or contest.place
the_job = TheJob() the_job = TheJob()
...@@ -197,6 +197,7 @@ def schedule_process_scans(contest: db.Contest, site: Optional[db.Place], for_us ...@@ -197,6 +197,7 @@ def schedule_process_scans(contest: db.Contest, site: Optional[db.Place], for_us
'in_files': in_files, 'in_files': in_files,
} }
the_job.submit() the_job.submit()
return the_job.job_id
@dataclass @dataclass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment