diff --git a/orchestrator/celery.py b/orchestrator/celery.py index 18691d45..368fab44 100644 --- a/orchestrator/celery.py +++ b/orchestrator/celery.py @@ -28,7 +28,7 @@ app.conf.beat_schedule = { "process_jobs": { "task": "orchestrator.tasks.process_jobs", - "schedule": 60.0, + "schedule": settings.RIDGEBACK_CHECK_JOBS_INTERVAL, "options": {"queue": settings.RIDGEBACK_SUBMIT_JOB_QUEUE}, }, "cleanup_completed_jobs": { diff --git a/orchestrator/tasks.py b/orchestrator/tasks.py index 271bd251..50836ce1 100644 --- a/orchestrator/tasks.py +++ b/orchestrator/tasks.py @@ -329,7 +329,9 @@ def check_job_status(job): job.update_status(batch_system_status) if batch_system_status in (Status.RUNNING,): - command_processor.delay(Command(CommandType.CHECK_HANGING, str(job.id)).to_dict()) + # TODO: Fix performance and errors in CHECK_HANGING and CHECK_COMMAND_LINE_STATUS commands + pass + # command_processor.delay(Command(CommandType.CHECK_HANGING, str(job.id)).to_dict()) # command_processor.delay(Command(CommandType.CHECK_COMMAND_LINE_STATUS, str(job.id)).to_dict()) elif batch_system_status in (Status.COMPLETED,): diff --git a/ridgeback/__init__.py b/ridgeback/__init__.py index df4be5e0..0b167e61 100644 --- a/ridgeback/__init__.py +++ b/ridgeback/__init__.py @@ -1 +1 @@ -__version__ = "2.1.4" +__version__ = "2.1.5" diff --git a/ridgeback/settings.py b/ridgeback/settings.py index 29d88539..d70a7097 100644 --- a/ridgeback/settings.py +++ b/ridgeback/settings.py @@ -204,6 +204,7 @@ RIDGEBACK_CLEANUP_QUEUE = os.environ.get("RIDGEBACK_CLEANUP_QUEUE", "ridgeback_cleanup_queue") RIDGEBACK_COMMAND_QUEUE = os.environ.get("RIDGEBACK_COMMAND_QUEUE", "ridgeback_command_queue") RIDGEBACK_SET_PERMISSIONS_QUEUE = os.environ.get("RIDGEBACK_SET_PERMISSIONS_QUEUE", "ridgeback_set_permissions") +RIDGEBACK_CHECK_JOBS_INTERVAL = int(os.environ.get("RIDGEBACK_CHECK_JOBS_INTERVAL", 180)) CELERY_ACCEPT_CONTENT = ["json"] CELERY_TASK_SERIALIZER = "json" @@ -213,6 +214,12 @@ LOG_PATH = os.environ.get("RIDGEBACK_LOG_PATH", "ridgeback-server.log") +if ENVIRONMENT == "prod": + handlers = ["file"] +else: + handlers = ["file", "console"] + + LOGGING = { "version": 1, "disable_existing_loggers": False, @@ -227,9 +234,9 @@ }, }, "loggers": { - "django_auth_ldap": {"level": "DEBUG", "handlers": ["console"]}, + "django_auth_ldap": {"level": "DEBUG", "handlers": handlers}, "django": { - "handlers": ["file", "console"], + "handlers": handlers, "level": "INFO", "propagate": True, },