mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
fix ocr command
This commit is contained in:
parent
ead0117bbb
commit
106fd75c75
@ -70,18 +70,15 @@ def __add_notification_data(job, notified_on_status, scoped_session):
|
|||||||
def __create_job_service(job):
|
def __create_job_service(job):
|
||||||
job_dir = os.path.join(NOPAQUE_STORAGE, str(job.user_id), 'jobs',
|
job_dir = os.path.join(NOPAQUE_STORAGE, str(job.user_id), 'jobs',
|
||||||
str(job.id))
|
str(job.id))
|
||||||
service_args = {'command': ('{} /files /files/output'.format(job.service)
|
cmd = '{} -i /files -o /files/output'.format(job.service)
|
||||||
+ ' {}'.format(job.secure_filename
|
if job.service == 'file-setup':
|
||||||
if job.service == 'file-setup'
|
cmd += ' -f {}'.format(job.secure_filename)
|
||||||
else '')
|
elif job.service == 'ocr':
|
||||||
+ ' {}'.format('--compress'
|
cmd += ' --compress'
|
||||||
if job.service == 'ocr'
|
cmd += ' --log-dir /files'
|
||||||
else '')
|
cmd += ' --zip [{}]_{}'.format(job.service, job.secure_filename)
|
||||||
+ ' --log-dir /files'
|
cmd += ' ' + ' '.join(json.loads(job.service_args))
|
||||||
+ ' --zip [{}]_{}'.format(job.service,
|
service_args = {'command': cmd,
|
||||||
job.secure_filename)
|
|
||||||
+ ' ' + ' '.join(json.loads(job.service_args))
|
|
||||||
),
|
|
||||||
'constraints': ['node.role==worker'],
|
'constraints': ['node.role==worker'],
|
||||||
'labels': {'origin': 'nopaque',
|
'labels': {'origin': 'nopaque',
|
||||||
'type': 'service.{}'.format(job.service),
|
'type': 'service.{}'.format(job.service),
|
||||||
|
Loading…
Reference in New Issue
Block a user