Worker: have a proper error if the medias volume is not mounted
Closed this issue · 0 comments
samlesu commented
If the medias volume is not mounted properly on the worker the tuple execution fails with the following message:
ERROR 2020-04-15 13:43:08,556 substrapp.tasks.tasks 708 139767323916096 [00-01-0126-1e30844]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/src/app/substrapp/tasks/tasks.py", line 550, in compute_task
max_retries=int(getattr(settings, 'CELERY_TASK_MAX_RETRIES')))
File "/usr/local/lib/python3.6/dist-packages/celery/app/task.py", line 704, in retry
raise_with_context(exc)
File "/usr/src/app/substrapp/tasks/tasks.py", line 543, in compute_task
prepare_materials(subtuple, tuple_type)
File "/usr/src/app/substrapp/tasks/utils.py", line 26, in timed
result = function(*args, **kw)
File "/usr/src/app/substrapp/tasks/tasks.py", line 580, in prepare_materials
prepare_opener(directory, subtuple)
File "/usr/src/app/substrapp/tasks/utils.py", line 26, in timed
result = function(*args, **kw)
File "/usr/src/app/substrapp/tasks/tasks.py", line 333, in prepare_opener
raise Exception('DataOpener Hash in Subtuple is not the same as in local db')
Exception: DataOpener Hash in Subtuple is not the same as in local db
It doesn't help to find the cause of the error. This is ambiguous and does not help for debugging.
The function get_hash
must be improved.