diff --git a/sld-api-backend/config/api.py b/sld-api-backend/config/api.py index 98a21dd8..4a562a9d 100644 --- a/sld-api-backend/config/api.py +++ b/sld-api-backend/config/api.py @@ -31,7 +31,7 @@ class Settings(BaseSettings): PASSWORD_LEN: int = os.getenv("SLD_PASSWORD_LEN", 8) ROLLBACK: bool = os.getenv("SLD_ROLLBACK", False) DEPLOY_TMOUT: int = os.getenv("SLD_DEPLOY_TMOUT", 7200) - GIT_TMOUT: int = os.getenv("SLD_GIT_TMOUT", 15) + GIT_TMOUT: int = os.getenv("SLD_GIT_TMOUT", 60) WORKER_TMOUT: int = os.getenv("SLD_WORKER_TMOUT", 300) ENV: str = os.getenv("SLD_ENV", "dev") DEBUG: bool = os.getenv("SLD_DEBUG", False) diff --git a/sld-api-backend/config/celery_config.py b/sld-api-backend/config/celery_config.py index be4392ae..f8f3f0cf 100644 --- a/sld-api-backend/config/celery_config.py +++ b/sld-api-backend/config/celery_config.py @@ -12,11 +12,11 @@ ) # use por 6379 for redis or 5672 for RabbitMQ BROKER_TYPE = os.getenv("BROKER_TYPE", "redis") # use amqp for RabbitMQ or redis # Redus backend config -BACKEND_TYPE = os.getenv("BACKEND_TYPE", "redis") -BACKEND_USER = os.getenv("BACKEND_USER", "") -BACKEND_PASSWD = os.getenv("BACKEND_PASSWD", "") -BACKEND_SERVER = os.getenv("BACKEND_SERVER", "redis") -BACKEND_DB = os.getenv("BACKEND_DB", "0") +BACKEND_TYPE = os.getenv("BACKEND_TYPE", "db+mysql") +BACKEND_USER = os.getenv("BACKEND_USER", "root") +BACKEND_PASSWD = os.getenv("BACKEND_PASSWD", "123") +BACKEND_SERVER = os.getenv("BACKEND_SERVER", "db") +BACKEND_DB = os.getenv("BACKEND_DB", "restapi") if not bool(os.getenv("DOCKER")): # if running example without docker celery_app = Celery( @@ -36,4 +36,6 @@ } celery_app.conf.update(task_track_started=True) -celery_app.conf.result_expires = os.getenv("SLD_RESULT_EXPIRE", "259200") +celery_app.conf.update(result_extended=True) +celery_app.conf.broker_transport_options = {"visibility_timeout": 28800} # 8 hours. +celery_app.conf.result_expires = os.getenv("SLD_RESULT_EXPIRE", "259200") \ No newline at end of file