def handle_new_artifacts(workers_backend, event: "Event") -> None: # noqa: F821 artifacts = event.data.get("artifacts") if not artifacts: return if conf.get(SCHEDULER_ENABLED): workers_backend.send( CoreSchedulerCeleryTasks.RUNS_SET_ARTIFACTS, kwargs={"run_id": event.instance_id, "artifacts": artifacts}, ) return manager.runs_set_artifacts( run_id=event.instance_id, run=event.instance, artifacts=artifacts )
def runs_set_artifacts(run_id, artifacts: List[Dict]): manager.runs_set_artifacts(run_id=run_id, run=None, artifacts=artifacts)