Merge pull request #2122 from chrismeyersfsu/fix-iso_celery_usage

iso nodes do not have celery. that is ok
This commit is contained in:
Chris Meyers 2018-06-11 15:47:16 -04:00 committed by GitHub
commit 769e714f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,11 +7,18 @@ import sys
import warnings
from pkg_resources import get_distribution
from .celery import app as celery_app # noqa
__version__ = get_distribution('awx').version
__all__ = ['__version__']
# Isolated nodes do not have celery installed
try:
from .celery import app as celery_app # noqa
__all__.append('celery_app')
except ImportError:
pass
__all__ = ['__version__', 'celery_app']
# Check for the presence/absence of "devonly" module to determine if running
# from a source code checkout or release packaage.