You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/01/29 14:25:49 UTC
[superset] 11/18: fix: session error fixed related to thumbnails.
(#12760)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch 1.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 3a962f81f60dca55e7a12a7d32ae42e4e6d5369a
Author: İbrahim Ercan <ib...@gmail.com>
AuthorDate: Wed Jan 27 14:04:14 2021 +0300
fix: session error fixed related to thumbnails. (#12760)
* fix: session error fixed related to thumbnails.
* compute_and_cache moved to session scope
* lint fix done
---
superset/tasks/thumbnails.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/superset/tasks/thumbnails.py b/superset/tasks/thumbnails.py
index eeba415..4ca4f27 100644
--- a/superset/tasks/thumbnails.py
+++ b/superset/tasks/thumbnails.py
@@ -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
@@ -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,
+ )