aminghadersohi commented on code in PR #38576:
URL: https://github.com/apache/superset/pull/38576#discussion_r3476967791
##########
superset/tasks/thumbnails.py:
##########
@@ -90,6 +93,9 @@ def cache_dashboard_thumbnail(
dashboard = Dashboard.get(dashboard_id)
url = get_url_path("Superset.dashboard", dashboard_id_or_slug=dashboard.id)
+ screenshot = DashboardScreenshot(url, dashboard.digest)
+ resolved_cache_key = cache_key or screenshot.get_cache_key(window_size,
thumb_size)
Review Comment:
Fixed — is now passed through to instead of the original parameter
(commit d05b963).
##########
superset/dashboards/api.py:
##########
@@ -1471,7 +1471,6 @@ def build_response(status_code: int) -> WerkzeugResponse:
if cache_payload.should_trigger_task(force):
logger.info("Triggering screenshot ASYNC")
- screenshot_obj.cache.set(cache_key,
ScreenshotCachePayload().to_dict())
cache_dashboard_screenshot.delay(
Review Comment:
Acknowledged. The charts/api.py pre-enqueue writes use
ScreenshotCachePayload() which defaults to PENDING status (not COMPUTING), so
they do not cause the self-skip issue. The DistributedLock inside
compute_and_cache handles dedup at the task level, making the API-level write
redundant rather than harmful. Aligning charts with dashboards is a separate
cleanup.
--
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]