Skip to content

Commit

Permalink
Add logger for Azure to see usage of scheduler/job_queue (#7177)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-eq authored Feb 14, 2024
1 parent 895683d commit 6895be5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ert/ensemble_evaluator/_builder/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

logger = logging.getLogger(__name__)
event_logger = logging.getLogger("ert.event_log")
scheduler_logger = logging.getLogger("ert.scheduler")


class _KillAllJobs(Protocol):
Expand Down Expand Up @@ -237,10 +238,17 @@ async def _evaluate_inner( # pylint: disable=too-many-branches
)
result = identifiers.EVTYPE_ENSEMBLE_FAILED

orchestrator = "scheduler"
if not isinstance(self._job_queue, Scheduler):
assert timeout_queue is not None
await timeout_queue.put(None) # signal to exit timer
await send_timeout_future
orchestrator = "job_queue"

scheduler_logger.info(
f"Experiment ran on QUEUESYSTEM: {self._queue_config.queue_system}"
)
scheduler_logger.info(f"Experiment ran on ORCHESTRATOR: {orchestrator}")

# Dispatch final result from evaluator - FAILED, CANCEL or STOPPED
await cloudevent_unary_send(event_creator(result, None))
Expand Down

0 comments on commit 6895be5

Please sign in to comment.