superset icon indicating copy to clipboard operation
superset copied to clipboard

in superset==0.281 How to configure the celery asynchronous query?

Open cscainiao opened this issue 7 years ago • 9 comments

cscainiao avatar Jul 11 '19 10:07 cscainiao

Issue-Label Bot is automatically applying the label #enhancement to this issue, with a confidence of 0.62. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jul 11 '19 10:07 issue-label-bot[bot]

We would appreciate it if you could provide us with more info about this issue/pr! Please do not leave the title or description empty.

request-info avatar Jul 11 '19 10:07 request-info

this is my config:

`class CeleryConfig(object): BROKER_URL = 'redis://localhost:6379/1' CELERY_IMPORTS = ('superset.sql_lab','superset.tasks', 'superset.charts', 'superset.dashboards') CELERY_RESULT_BACKEND = 'redis://localhost:6379/1' CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}} CELERYD_LOG_LEVEL = 'DEBUG' CELERYD_PREFETCH_MULTIPLIER = 10 CELERY_ACKS_LATE = True

CELERY_CONFIG = CeleryConfig

from werkzeug.contrib.cache import RedisCache RESULTS_BACKEND = RedisCache( host='localhost', port=6379, key_prefix="superset_results:")`

cscainiao avatar Jul 11 '19 10:07 cscainiao

i run this command celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4 but show 'no model named superset.tasks'

cscainiao avatar Jul 11 '19 10:07 cscainiao

superset master branch have the model superset.tasks, but other branch have no model named superset.tasks

cscainiao avatar Jul 11 '19 10:07 cscainiao

how can i start the celery?

cscainiao avatar Jul 11 '19 10:07 cscainiao

Do you have superset installed on your environment?

command:

celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4

dpgaspar avatar Jul 11 '19 11:07 dpgaspar

celery worker --app=superset.sql_lab:celery_app --pool=prefork -Ofair -c 4

I run this command, it's work

cscainiao avatar Jul 12 '19 07:07 cscainiao

If it works, can you close the issue?

dpgaspar avatar Jul 15 '19 12:07 dpgaspar