Files @ 72c8917108ee
Branch filter:

Location: kallithea/rhodecode/lib/celerypylons/__init__.py - annotation

Mads Kiilerich
journal: don't show "error" popup when navigating away from page while lazy info is loading

The "error" box would pop up in the Journal view when quickly pointing and
clicking a link while the info was loading.

This fix might prevent showing valid error messages in some browsers.
"""
Automatically sets the environment variable `CELERY_LOADER` to
`celerypylons.loader:PylonsLoader`.  This ensures the loader is
specified when accessing the rest of this package, and allows celery
to be installed in a webapp just by importing celerypylons::

    import celerypylons

"""
import os
import warnings

CELERYPYLONS_LOADER = 'rhodecode.lib.celerypylons.loader.PylonsLoader'
if os.environ.get('CELERY_LOADER', CELERYPYLONS_LOADER) != CELERYPYLONS_LOADER:
    warnings.warn("'CELERY_LOADER' environment variable will be overridden by celery-pylons.")
os.environ['CELERY_LOADER'] = CELERYPYLONS_LOADER