You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by dp...@apache.org on 2021/01/27 11:04:52 UTC
[superset] branch master updated: fix: session error fixed related
to thumbnails. (#12760)
This is an automated email from the ASF dual-hosted git repository.
dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 49e6e42 fix: session error fixed related to thumbnails. (#12760)
49e6e42 is described below
commit 49e6e420da517e7348599a53722afc8ab2231559
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,
+ )