Commit 35351df9 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Ensure that celery tasks are exectuted while in correct working directory.

parent dc3f8f4f
Pipeline #46198 passed with stages
in 16 minutes and 50 seconds
......@@ -15,6 +15,7 @@
from typing import List, Any
import logging
import time
import os
from celery import Celery, Task
from celery.worker.request import Request
from celery.signals import after_setup_task_logger, after_setup_logger, worker_process_init, \
......@@ -472,6 +473,7 @@ def proc_task(task, cls_name, self_id, func_attr):
deleted = False
try:
self.process_status = PROCESS_RUNNING
os.chdir(config.fs.working_directory)
deleted = func(self)
except SoftTimeLimitExceeded as e:
logger.error('exceeded the celery task soft time limit')
......
......@@ -13,6 +13,7 @@ data:
fs:
tmp: "{{ .Values.volumes.tmp }}"
prefix_size: {{ .Values.volumes.prefixSize }}
working_directory: /app
logstash:
enabled: true
host: "{{ .Values.logstash.host }}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment