Skip to content

Commit

Permalink
fix: session error fixed related to thumbnails. (#12760)
Browse files Browse the repository at this point in the history
* fix: session error fixed related to thumbnails.

* compute_and_cache moved to session scope

* lint fix done
  • Loading branch information
iercan authored and villebro committed Jan 29, 2021
1 parent 99534f2 commit 3a962f8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions superset/tasks/thumbnails.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def cache_chart_thumbnail(
user = security_manager.get_user_by_username(
current_app.config["THUMBNAIL_SELENIUM_USER"], session=session
)
screenshot.compute_and_cache(
user=user,
cache=thumbnail_cache,
force=force,
window_size=window_size,
thumb_size=thumb_size,
)
screenshot.compute_and_cache(
user=user,
cache=thumbnail_cache,
force=force,
window_size=window_size,
thumb_size=thumb_size,
)
return None


Expand All @@ -73,6 +73,6 @@ def cache_dashboard_thumbnail(
user = security_manager.get_user_by_username(
current_app.config["THUMBNAIL_SELENIUM_USER"], session=session
)
screenshot.compute_and_cache(
user=user, cache=thumbnail_cache, force=force, thumb_size=thumb_size,
)
screenshot.compute_and_cache(
user=user, cache=thumbnail_cache, force=force, thumb_size=thumb_size,
)

0 comments on commit 3a962f8

Please # to comment.