Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protocol to cache warmup #8721

Merged
merged 5 commits into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/presets/MainPreset.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import {
LineMultiChartPlugin,
PieChartPlugin,
TimePivotChartPlugin,
} from '@superset-ui/legacy-preset-chart-nvd3/lib';
} from '@superset-ui/legacy-preset-chart-nvd3/src';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revert this.

import { BoxPlotChartPlugin } from '@superset-ui/preset-chart-xy/esm/legacy';
import { DeckGLChartPreset } from '@superset-ui/legacy-preset-chart-deckgl';

Expand Down
1 change: 1 addition & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def _try_json_readsha(filepath):
SUPERSET_WORKERS = 2 # deprecated
SUPERSET_CELERY_WORKERS = 32 # deprecated

SUPERSET_WEBSERVER_PROTOCOL = "http"
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"
SUPERSET_WEBSERVER_PORT = 8088

Expand Down
2 changes: 1 addition & 1 deletion superset/tasks/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_form_data(chart_id, dashboard=None):
def get_url(chart):
"""Return external URL for warming up a given chart/table cache."""
with app.test_request_context():
baseurl = "{SUPERSET_WEBSERVER_ADDRESS}:{SUPERSET_WEBSERVER_PORT}".format(
baseurl = "{SUPERSET_WEBSERVER_PROTOCOL}://{SUPERSET_WEBSERVER_ADDRESS}:{SUPERSET_WEBSERVER_PORT}".format(
**app.config
)
return f"{baseurl}{chart.url}"
Expand Down
2 changes: 1 addition & 1 deletion tests/strategy_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from .base_tests import SupersetTestCase

URL_PREFIX = "0.0.0.0:8081"
URL_PREFIX = "http://0.0.0.0:8081"


class CacheWarmUpTests(SupersetTestCase):
Expand Down