Skip to content

Commit

Permalink
70: Log job reference on submission.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfse-slafleur committed Oct 14, 2024
1 parent 80871fa commit 214d4eb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/omotes_orchestrator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,9 @@ def new_job_submitted_handler(self, job_submission: JobSubmission) -> None:
job_uuid = uuid.UUID(job_submission.uuid)
if workflow_type is None:
logger.warning(
"Received a new job (id %s) with unknown workflow type %s. Ignoring job.",
"Received a new job (id %s, reference %s) with unknown workflow type %s. Ignoring job.",
job_submission.uuid,
job_submission.job_reference,

Check failure on line 281 in src/omotes_orchestrator/main.py

View workflow job for this annotation

GitHub Actions / Typecheck (3.11)

error: "JobSubmission" has no attribute "job_reference" [attr-defined]
job_submission.workflow_type,
)
self.omotes_sdk_if.send_job_result_by_job_id(
Expand All @@ -295,7 +296,10 @@ def new_job_submitted_handler(self, job_submission: JobSubmission) -> None:
job = Job(job_uuid, workflow_type)

logger.info(
"Received new job %s for workflow type %s", job.id, job_submission.workflow_type
"Received new job %s with reference %s for workflow type %s",
job.id,
job_submission.job_reference,

Check failure on line 301 in src/omotes_orchestrator/main.py

View workflow job for this annotation

GitHub Actions / Typecheck (3.11)

error: "JobSubmission" has no attribute "job_reference" [attr-defined]
job_submission.workflow_type,
)
submitted_job_id = uuid.UUID(job_submission.uuid)

Expand All @@ -309,7 +313,7 @@ def new_job_submitted_handler(self, job_submission: JobSubmission) -> None:
"New job %s was already registered previously. Will be submitted %s", job.id, submit
)
else:
logger.debug("New job %s was not yet registered. Registering and submitting.")
logger.debug("New job %s was not yet registered. Registering and submitting.", job.id)

if not job_submission.HasField("timeout_ms"):
timeout_after_ms = None
Expand Down Expand Up @@ -341,7 +345,11 @@ def new_job_submitted_handler(self, job_submission: JobSubmission) -> None:
)

self.postgresql_if.set_job_submitted(job.id, celery_task_id)
logger.debug("New job %s has been submitted.", job.id)
logger.debug(
"New job %s with reference %s has been submitted.",
job.id,
job_submission.job_reference,

Check failure on line 351 in src/omotes_orchestrator/main.py

View workflow job for this annotation

GitHub Actions / Typecheck (3.11)

error: "JobSubmission" has no attribute "job_reference" [attr-defined]
)
self._init_barriers.set_barrier(submitted_job_id)

def job_cancellation_handler(self, job_cancellation: JobCancel) -> None:
Expand Down

0 comments on commit 214d4eb

Please sign in to comment.