codeant-ai-for-open-source[bot] commented on PR #38576:
URL: https://github.com/apache/superset/pull/38576#issuecomment-4041156534

   ## **Sequence Diagram**
   
   This PR updates the dashboard thumbnail flow so the API marks thumbnails as 
computing before enqueueing work and the Celery task skips duplicate executions 
when another task is already computing the same thumbnail.
   
   ```mermaid
   sequenceDiagram
       participant Client
       participant Dashboard API
       participant Cache store
       participant Celery worker
       participant Screenshot service
   
       Client->>Dashboard API: Request dashboard thumbnail
       Dashboard API->>Cache store: Load thumbnail cache status
   
       alt No task in progress
           Dashboard API->>Cache store: Mark status as computing
           Dashboard API->>Celery worker: Enqueue thumbnail task
       else Already computing
           Dashboard API->>Dashboard API: Skip enqueue duplicate task
       end
       Dashboard API-->>Client: Return thumbnail status
   
       Celery worker->>Cache store: Load status for thumbnail
       alt Status computing and not stale
           Celery worker->>Celery worker: Skip duplicate thumbnail computation
       else Status not computing or stale
           Celery worker->>Screenshot service: Compute and cache thumbnail
       end
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to