Skip to content

Commit

Permalink
fixup! Create end point for events
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Jan 21, 2025
1 parent 8a5e1a0 commit 0d706bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/everest/detached/jobs/everserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,20 +377,21 @@ async def everserver_main():

event = jsonable_encoder(item)
shared_data["events"].append(event)
for sub in shared_data["subscribers"]:
for sub in shared_data["subscribers"].values():
sub.notify()
await asyncio.sleep(0.1)

if isinstance(item, EndEvent):
events.append(EndTaskEvent())
for sub in shared_data["subscribers"]:
for sub in shared_data["subscribers"].values():
sub.notify()
break

await simulation_future
run_model = None

status, message = _get_optimization_status(run_model.exit_code, shared_data)
run_model = None

if status != ServerStatus.completed:
update_everserver_status(status_path, status, message)
return
Expand Down

0 comments on commit 0d706bb

Please sign in to comment.