extract method (async)

This commit is contained in:
Kikimanox
2022-10-18 19:24:38 +02:00
parent 673a83691b
commit f89b84dd31
3 changed files with 60 additions and 19 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ class Job(BaseModel):
input_file = TextField(index=True, null=True)
db.drop_tables([Job]) # TODO: After pushing this, comment it and push again
# db.drop_tables([Job]) # TODO: After pushing this, comment it and push again
db.create_tables([Job])
@@ -60,7 +60,7 @@ class JobManager:
:return: Job object, Did already exist boolean
"""
try:
if job_type == 2:
if job_type in [2, 4]:
job, is_new = Job.get_or_create(job_type=job_type, job_input=job_input, input_size=len(job_input))
elif job_type in [1, 3, 12, 32]:
tmp_file = ""