diff --git a/gateway/api/management/commands/schedule_queued_jobs.py b/gateway/api/management/commands/schedule_queued_jobs.py index b9ff95cb5..b3e8eebfc 100644 --- a/gateway/api/management/commands/schedule_queued_jobs.py +++ b/gateway/api/management/commands/schedule_queued_jobs.py @@ -115,7 +115,7 @@ def schedule_jobs_if_slots_available( succeed = True except RecordModifiedError: logger.warning( - "Schedule: Job[%s] record has not been updated due to lock.", + "Schedule: Job [%s] record has not been updated due to lock.", job.id, ) diff --git a/gateway/api/management/commands/update_jobs_statuses.py b/gateway/api/management/commands/update_jobs_statuses.py index fc1e5b3e3..5a2a2a266 100644 --- a/gateway/api/management/commands/update_jobs_statuses.py +++ b/gateway/api/management/commands/update_jobs_statuses.py @@ -76,7 +76,7 @@ def handle(self, *args, **options): job.save() except RecordModifiedError: logger.warning( - "Job[%s] record has not been updated due to lock.", job.id + "Job [%s] record has not been updated due to lock.", job.id ) else: diff --git a/gateway/api/ray.py b/gateway/api/ray.py index b9d5e0164..a02e32eb4 100644 --- a/gateway/api/ray.py +++ b/gateway/api/ray.py @@ -126,7 +126,7 @@ def submit(self, job: Job) -> Optional[str]: encoding="utf-8", ) as f: if job.arguments: - logger.debug("uploading arguments for job %s", job.id) + logger.debug("uploading arguments for job [%s]", job.id) f.write(job.arguments) else: f.write({}) diff --git a/gateway/api/schedule.py b/gateway/api/schedule.py index 2dd3897f2..e55788f7f 100644 --- a/gateway/api/schedule.py +++ b/gateway/api/schedule.py @@ -48,7 +48,7 @@ def execute_job(job: Job) -> Job: job.program.provider and job.program.provider.name in gpujobs["gpu-functions"].keys() ): - logger.debug("Job %s will be run on GPU nodes", job.id) + logger.debug("Job [%s] will be run on GPU nodes", job.id) job.gpu = True job.save() diff --git a/gateway/api/utils.py b/gateway/api/utils.py index 9565033cc..994236c10 100644 --- a/gateway/api/utils.py +++ b/gateway/api/utils.py @@ -129,11 +129,11 @@ def build_env_variables(token, job: Job, args: str = None) -> Dict[str, str]: arguments = "{}" if args: if objsize.get_deep_size(args) < 100000: - logger.debug("passing arguments as envvar for job %s", job.id) + logger.debug("passing arguments as env_var for job [%s]", job.id) arguments = args else: logger.warning( - "arguments for job %s are too large and will not be written to env var", + "arguments for job [%s] are too large and will not be written to env_var", job.id, ) diff --git a/gateway/api/views/jobs.py b/gateway/api/views/jobs.py index d432c993c..f6932ad8e 100644 --- a/gateway/api/views/jobs.py +++ b/gateway/api/views/jobs.py @@ -132,8 +132,7 @@ def result(self, request, pk=None): # pylint: disable=invalid-name,unused-argum saved = True except RecordModifiedError: logger.warning( - "Job[%s] record has not been updated due to lock. " - "Retrying. Attempts left %s", + "Job [%s] record has not been updated due to lock. Retrying. Attempts left %s", # pylint: disable=line-too-long job.id, attempts_left, ) diff --git a/gateway/api/views/programs.py b/gateway/api/views/programs.py index 21cb5e6c1..cfe5242e2 100644 --- a/gateway/api/views/programs.py +++ b/gateway/api/views/programs.py @@ -116,7 +116,7 @@ def get_queryset(self): author_programs_count = author_programs.count() logger.info( - "ProgramViewSet get author[%s] programs[%s]", + "ProgramViewSet get author [%s] programs [%s]", author.id, author_programs_count, ) @@ -140,7 +140,7 @@ def get_run_queryset(self): author_groups_with_run_permissions.count() ) logger.info( - "ProgramViewSet get author[%s] groups [%s]", + "ProgramViewSet get author [%s] groups [%s]", author.id, author_groups_with_run_permissions_count, ) @@ -155,7 +155,7 @@ def get_run_queryset(self): ).distinct() author_programs_count = author_programs.count() logger.info( - "ProgramViewSet get author[%s] programs[%s]", + "ProgramViewSet get author [%s] programs [%s]", author.id, author_programs_count, ) @@ -328,7 +328,7 @@ def _get_program_queryset_for_title_and_provider( author_groups_with_view_permissions.count() ) logger.info( - "ProgramViewSet get author[%s] groups [%s]", + "ProgramViewSet get author [%s] groups [%s]", author.id, author_groups_with_view_permissions_count, )