Skip to content

Only subscribe to compute block status update websocket, when project is currently running #128

@PaulKalho

Description

@PaulKalho

Currently, we are subscribing to the compute block status websocket as soon as a project is selected.

This can lead to weird errors when switching projects too fast.

We should only connect to this websocket if a project is currently running (we have this information from the project status websocket).

I tried to implement this in #122, however noticed this would be much out of scope as it would require (if done in a nice manner) a refactoring of the central state handling. (e.g. using zustand for handling, updating & sharing state across components).

We could also think about changing the websockets desing to one that sends events, that we can handle in the frontend, instead of just polling airflow and providing the frontend with this data.

e.g.

{
   type: "PROJECT_STATUS_CHANGED",
   data: {
      id: "uuid", 
      status: "RUNNING"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions