Changing the default celery pool



I want to use gevent pool instead of celery default prefork I added the -P flag with gevent however I keep getting this error.

rker[16712]: [2019-01-21 11:06:45,643][PID:1][ERROR][MainProcess] Task 
rker[16712]: Traceback (most recent call last):
rker[16712]:   File "/usr/local/lib/python2.7/dist-packages/celery/app/", line 382, in trace_task
rker[16712]:     R = retval = fun(*args, **kwargs)
rker[16712]:   File "/app/redash/", line 70, in __call__
rker[16712]:     with current_app.app_context():
rker[16712]:   File "/usr/local/lib/python2.7/dist-packages/werkzeug/", line 343, in __getattr__
rker[16712]:     return getattr(self._get_current_object(), name)
rker[16712]:   File "/usr/local/lib/python2.7/dist-packages/werkzeug/", line 302, in _get_current_object
rker[16712]:     return self.__local()
rker[16712]:   File "/usr/local/lib/python2.7/dist-packages/flask/", line 51, in _find_app
rker[16712]:     raise RuntimeError(_app_ctx_err_msg)
rker[16712]: RuntimeError: Working outside of application context.

Can you let me know what I am doing wrong, or point out the piece of code I might have to modify regarding this.

I also did the monkey patch in the file as per the celery documentation.



It might be related to this: