'Priority que' logic implementation

This commit is contained in:
Kikimanox
2022-12-06 21:53:19 +01:00
parent 911bc8f0c9
commit d3cedd47b5
2 changed files with 143 additions and 65 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ class JobManager:
pathlib.Path('tmp').mkdir(exist_ok=True)
job_input: werkzeug.datastructures.FileStorage
job_input.save(tmp_file)
job, is_new = Job.get_or_create(job_type=job_type, input_file=tmp_file, input_size=-1)
job, is_new = Job.get_or_create(job_type=job_type, input_file=tmp_file,
input_size=os.stat(tmp_file).st_size)
return job, is_new
except Exception as e: