You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when a user kicks off an image download (for either a single site, or an entire model run), the endpoint simply places a message on the queue for the celery worker to pick up. Then, the celery worker creates a SatelliteFetching row once the task starts to signal that the image generation is running. This results in a race condition where, if the celery worker is preoccupied with another task or not up, the SatelliteFetching row will not be created. This means the UI will not update to let the user know the imagery task has started.
The easiest way to observe this is to run the app locally, stop your celery worker, and then kick off an image fetch task. Notice, the UI does not update or indicate anything is happening.
I can think of two ways to fix this -
Add a PENDING status to the SatelliteFetching model and set it in the endpoint prior to dispatching the task. Once the task begins, set it to RUNNING.
Just create the SatelliteFetching row in the endpoint with a status of RUNNING prior to dispatching the task.
I think option 2 makes more sense. Not only is it simpler to implement, but I don't see any value in distinguishing between a PENDING and RUNNING task in the UI. Either way the user is waiting, so it doesn't seem like it would offer any useful information.
The text was updated successfully, but these errors were encountered:
Currently when a user kicks off an image download (for either a single site, or an entire model run), the endpoint simply places a message on the queue for the celery worker to pick up. Then, the celery worker creates a
SatelliteFetching
row once the task starts to signal that the image generation is running. This results in a race condition where, if the celery worker is preoccupied with another task or not up, theSatelliteFetching
row will not be created. This means the UI will not update to let the user know the imagery task has started.The easiest way to observe this is to run the app locally, stop your celery worker, and then kick off an image fetch task. Notice, the UI does not update or indicate anything is happening.
I can think of two ways to fix this -
PENDING
status to theSatelliteFetching
model and set it in the endpoint prior to dispatching the task. Once the task begins, set it toRUNNING
.SatelliteFetching
row in the endpoint with a status ofRUNNING
prior to dispatching the task.I think option 2 makes more sense. Not only is it simpler to implement, but I don't see any value in distinguishing between a PENDING and RUNNING task in the UI. Either way the user is waiting, so it doesn't seem like it would offer any useful information.
The text was updated successfully, but these errors were encountered: