<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>
<p dir="auto"><strong>4.3.0 (rhubarb)</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><p dir="auto">software -&gt; celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.7.2<br>
billiard:3.6.0.0 py-amqp:2.4.2<br>
platform -&gt; system:Linux arch:64bit<br>
kernel version:4.15.0-46-generic imp:CPython<br>
loader   -&gt; celery.loaders.app.AppLoader<br>
settings -&gt; transport:amqp results:disabled</p>
<p dir="auto">ABSOLUTE_URL_OVERRIDES: {<br>
}<br>
ADMINS:<br>
()<br>
ALLOWED_HOSTS: []<br>
APPEND_SLASH: True<br>
AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']<br>
AUTH_PASSWORD_VALIDATORS: '<strong>'<br>
AUTH_USER_MODEL: 'auth.User'<br>
CACHES: {<br>
'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}<br>
CACHE_MIDDLEWARE_ALIAS: 'default'<br>
CACHE_MIDDLEWARE_KEY_PREFIX: '</strong>'<br>
CACHE_MIDDLEWARE_SECONDS: 600<br>
CELERY_BROKER_URL: 'amqp://guest:<strong><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/localhost/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/localhost">@localhost</a>:5672//'<br>
CSRF_COOKIE_AGE: 31449600<br>
CSRF_COOKIE_DOMAIN: None<br>
CSRF_COOKIE_HTTPONLY: False<br>
CSRF_COOKIE_NAME: 'csrftoken'<br>
CSRF_COOKIE_PATH: '/'<br>
CSRF_COOKIE_SAMESITE: 'Lax'<br>
CSRF_COOKIE_SECURE: False<br>
CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'<br>
CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'<br>
CSRF_TRUSTED_ORIGINS: []<br>
CSRF_USE_SESSIONS: False<br>
DATABASES: {<br>
'default': {   'ATOMIC_REQUESTS': False,<br>
'AUTOCOMMIT': True,<br>
'CONN_MAX_AGE': 0,<br>
'ENGINE': 'django.db.backends.sqlite3',<br>
'HOST': '',<br>
'NAME': 'test.db',<br>
'OPTIONS': {},<br>
'PASSWORD': '</strong>',<br>
'PORT': '',<br>
'TEST': {   'CHARSET': None,<br>
'COLLATION': None,<br>
'MIRROR': None,<br>
'NAME': None},<br>
'TIME_ZONE': None,<br>
'USER': ''}}<br>
DATABASE_ROUTERS: '<strong>'<br>
DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440<br>
DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000<br>
DATETIME_FORMAT: 'N j, Y, P'<br>
DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',<br>
'%Y-%m-%d %H:%M:%S.%f',<br>
'%Y-%m-%d %H:%M',<br>
'%Y-%m-%d',<br>
'%m/%d/%Y %H:%M:%S',<br>
'%m/%d/%Y %H:%M:%S.%f',<br>
'%m/%d/%Y %H:%M',<br>
'%m/%d/%Y',<br>
'%m/%d/%y %H:%M:%S',<br>
'%m/%d/%y %H:%M:%S.%f',<br>
'%m/%d/%y %H:%M',<br>
'%m/%d/%y']<br>
DATE_FORMAT: 'N j, Y'<br>
DATE_INPUT_FORMATS: ['%Y-%m-%d',<br>
'%m/%d/%Y',<br>
'%m/%d/%y',<br>
'%b %d %Y',<br>
'%b %d, %Y',<br>
'%d %b %Y',<br>
'%d %b, %Y',<br>
'%B %d %Y',<br>
'%B %d, %Y',<br>
'%d %B %Y',<br>
'%d %B, %Y']<br>
DEBUG: True<br>
DEBUG_PROPAGATE_EXCEPTIONS: False<br>
DECIMAL_SEPARATOR: '.'<br>
DEFAULT_CHARSET: 'utf-8'<br>
DEFAULT_CONTENT_TYPE: 'text/html'<br>
DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'<br>
DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'<br>
DEFAULT_FROM_EMAIL: 'webmaster@localhost'<br>
DEFAULT_INDEX_TABLESPACE: ''<br>
DEFAULT_TABLESPACE: ''<br>
DISALLOWED_USER_AGENTS: []<br>
EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'<br>
EMAIL_HOST: 'localhost'<br>
EMAIL_HOST_PASSWORD: '</strong>'<br>
EMAIL_HOST_USER: ''<br>
EMAIL_PORT: 25<br>
EMAIL_SSL_CERTFILE: None<br>
EMAIL_SSL_KEYFILE: '<strong>'<br>
EMAIL_SUBJECT_PREFIX: '[Django] '<br>
EMAIL_TIMEOUT: None<br>
EMAIL_USE_LOCALTIME: False<br>
EMAIL_USE_SSL: False<br>
EMAIL_USE_TLS: False<br>
FILE_CHARSET: 'utf-8'<br>
FILE_UPLOAD_DIRECTORY_PERMISSIONS: None<br>
FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',<br>
'django.core.files.uploadhandler.TemporaryFileUploadHandler']<br>
FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440<br>
FILE_UPLOAD_PERMISSIONS: None<br>
FILE_UPLOAD_TEMP_DIR: None<br>
FIRST_DAY_OF_WEEK: 0<br>
FIXTURE_DIRS: []<br>
FORCE_SCRIPT_NAME: None<br>
FORMAT_MODULE_PATH: None<br>
FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'<br>
IGNORABLE_404_URLS: []<br>
INSTALLED_APPS:<br>
('django.contrib.auth',<br>
'django.contrib.contenttypes',<br>
'django.contrib.sessions',<br>
'django.contrib.sites',<br>
'django.contrib.messages',<br>
'django.contrib.staticfiles',<br>
'django.contrib.admin',<br>
'demoapp')<br>
INTERNAL_IPS: []<br>
LANGUAGES: [('af', 'Afrikaans'),<br>
('ar', 'Arabic'),<br>
('ast', 'Asturian'),<br>
('az', 'Azerbaijani'),<br>
('bg', 'Bulgarian'),<br>
('be', 'Belarusian'),<br>
('bn', 'Bengali'),<br>
('br', 'Breton'),<br>
('bs', 'Bosnian'),<br>
('ca', 'Catalan'),<br>
('cs', 'Czech'),<br>
('cy', 'Welsh'),<br>
('da', 'Danish'),<br>
('de', 'German'),<br>
('dsb', 'Lower Sorbian'),<br>
('el', 'Greek'),<br>
('en', 'English'),<br>
('en-au', 'Australian English'),<br>
('en-gb', 'British English'),<br>
('eo', 'Esperanto'),<br>
('es', 'Spanish'),<br>
('es-ar', 'Argentinian Spanish'),<br>
('es-co', 'Colombian Spanish'),<br>
('es-mx', 'Mexican Spanish'),<br>
('es-ni', 'Nicaraguan Spanish'),<br>
('es-ve', 'Venezuelan Spanish'),<br>
('et', 'Estonian'),<br>
('eu', 'Basque'),<br>
('fa', 'Persian'),<br>
('fi', 'Finnish'),<br>
('fr', 'French'),<br>
('fy', 'Frisian'),<br>
('ga', 'Irish'),<br>
('gd', 'Scottish Gaelic'),<br>
('gl', 'Galician'),<br>
('he', 'Hebrew'),<br>
('hi', 'Hindi'),<br>
('hr', 'Croatian'),<br>
('hsb', 'Upper Sorbian'),<br>
('hu', 'Hungarian'),<br>
('ia', 'Interlingua'),<br>
('id', 'Indonesian'),<br>
('io', 'Ido'),<br>
('is', 'Icelandic'),<br>
('it', 'Italian'),<br>
('ja', 'Japanese'),<br>
('ka', 'Georgian'),<br>
('kab', 'Kabyle'),<br>
('kk', 'Kazakh'),<br>
('km', 'Khmer'),<br>
('kn', 'Kannada'),<br>
('ko', 'Korean'),<br>
('lb', 'Luxembourgish'),<br>
('lt', 'Lithuanian'),<br>
('lv', 'Latvian'),<br>
('mk', 'Macedonian'),<br>
('ml', 'Malayalam'),<br>
('mn', 'Mongolian'),<br>
('mr', 'Marathi'),<br>
('my', 'Burmese'),<br>
('nb', 'Norwegian Bokmål'),<br>
('ne', 'Nepali'),<br>
('nl', 'Dutch'),<br>
('nn', 'Norwegian Nynorsk'),<br>
('os', 'Ossetic'),<br>
('pa', 'Punjabi'),<br>
('pl', 'Polish'),<br>
('pt', 'Portuguese'),<br>
('pt-br', 'Brazilian Portuguese'),<br>
('ro', 'Romanian'),<br>
('ru', 'Russian'),<br>
('sk', 'Slovak'),<br>
('sl', 'Slovenian'),<br>
('sq', 'Albanian'),<br>
('sr', 'Serbian'),<br>
('sr-latn', 'Serbian Latin'),<br>
('sv', 'Swedish'),<br>
('sw', 'Swahili'),<br>
('ta', 'Tamil'),<br>
('te', 'Telugu'),<br>
('th', 'Thai'),<br>
('tr', 'Turkish'),<br>
('tt', 'Tatar'),<br>
('udm', 'Udmurt'),<br>
('uk', 'Ukrainian'),<br>
('ur', 'Urdu'),<br>
('vi', 'Vietnamese'),<br>
('zh-hans', 'Simplified Chinese'),<br>
('zh-hant', 'Traditional Chinese')]<br>
LANGUAGES_BIDI: ['he', 'ar', 'fa', 'ur']<br>
LANGUAGE_CODE: 'en-us'<br>
LANGUAGE_COOKIE_AGE: None<br>
LANGUAGE_COOKIE_DOMAIN: None<br>
LANGUAGE_COOKIE_NAME: 'django_language'<br>
LANGUAGE_COOKIE_PATH: '/'<br>
LOCALE_PATHS: []<br>
LOGGING: {<br>
'disable_existing_loggers': False,<br>
'filters': {   'require_debug_false': {   '()': 'django.utils.log.RequireDebugFalse'}},<br>
'handlers': {   'mail_admins': {   'class': 'django.utils.log.AdminEmailHandler',<br>
'filters': ['require_debug_false'],<br>
'level': 'ERROR'}},<br>
'loggers': {   'django.request': {   'handlers': ['mail_admins'],<br>
'level': 'ERROR',<br>
'propagate': True}},<br>
'version': 1}<br>
LOGGING_CONFIG: 'logging.config.dictConfig'<br>
LOGIN_REDIRECT_URL: '/accounts/profile/'<br>
LOGIN_URL: '/accounts/login/'<br>
LOGOUT_REDIRECT_URL: None<br>
MANAGERS:<br>
()<br>
MEDIA_ROOT: ''<br>
MEDIA_URL: ''<br>
MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'<br>
MIDDLEWARE: []<br>
MIDDLEWARE_CLASSES:<br>
('django.middleware.common.CommonMiddleware',<br>
'django.contrib.sessions.middleware.SessionMiddleware',<br>
'django.middleware.csrf.CsrfViewMiddleware',<br>
'django.contrib.auth.middleware.AuthenticationMiddleware',<br>
'django.contrib.messages.middleware.MessageMiddleware')<br>
MIGRATION_MODULES: {<br>
}<br>
MONTH_DAY_FORMAT: 'F j'<br>
NUMBER_GROUPING: 0<br>
PASSWORD_HASHERS: '</strong>'<br>
PASSWORD_RESET_TIMEOUT_DAYS: '<strong>'<br>
PREPEND_WWW: False<br>
ROOT_URLCONF: 'proj.urls'<br>
SECRET_KEY: '</strong>'<br>
SECURE_BROWSER_XSS_FILTER: False<br>
SECURE_CONTENT_TYPE_NOSNIFF: False<br>
SECURE_HSTS_INCLUDE_SUBDOMAINS: False<br>
SECURE_HSTS_PRELOAD: False<br>
SECURE_HSTS_SECONDS: 0<br>
SECURE_PROXY_SSL_HEADER: None<br>
SECURE_REDIRECT_EXEMPT: []<br>
SECURE_SSL_HOST: None<br>
SECURE_SSL_REDIRECT: False<br>
SERVER_EMAIL: 'root@localhost'<br>
SESSION_CACHE_ALIAS: 'default'<br>
SESSION_COOKIE_AGE: 1209600<br>
SESSION_COOKIE_DOMAIN: None<br>
SESSION_COOKIE_HTTPONLY: True<br>
SESSION_COOKIE_NAME: 'sessionid'<br>
SESSION_COOKIE_PATH: '/'<br>
SESSION_COOKIE_SAMESITE: 'Lax'<br>
SESSION_COOKIE_SECURE: False<br>
SESSION_ENGINE: 'django.contrib.sessions.backends.db'<br>
SESSION_EXPIRE_AT_BROWSER_CLOSE: False<br>
SESSION_FILE_PATH: None<br>
SESSION_SAVE_EVERY_REQUEST: False<br>
SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'<br>
SETTINGS_MODULE: 'proj.settings'<br>
SHORT_DATETIME_FORMAT: 'm/d/Y P'<br>
SHORT_DATE_FORMAT: 'm/d/Y'<br>
SIGNING_BACKEND: 'django.core.signing.TimestampSigner'<br>
SILENCED_SYSTEM_CHECKS: []<br>
SITE_ID: 1<br>
STATICFILES_DIRS:<br>
()<br>
STATICFILES_FINDERS:<br>
('django.contrib.staticfiles.finders.FileSystemFinder',<br>
'django.contrib.staticfiles.finders.AppDirectoriesFinder')<br>
STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'<br>
STATIC_ROOT: ''<br>
STATIC_URL: '/static/'<br>
TEMPLATES: []<br>
TEMPLATE_DEBUG: True<br>
TEMPLATE_DIRS:<br>
()<br>
TEMPLATE_LOADERS:<br>
('django.template.loaders.filesystem.Loader',<br>
'django.template.loaders.app_directories.Loader')<br>
TEST_NON_SERIALIZED_APPS: []<br>
TEST_RUNNER: 'django.test.runner.DiscoverRunner'<br>
THOUSAND_SEPARATOR: ','<br>
TIME_FORMAT: 'P'<br>
TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']<br>
TIME_ZONE: 'America/Chicago'<br>
USE_I18N: True<br>
USE_L10N: True<br>
USE_THOUSAND_SEPARATOR: False<br>
USE_TZ: True<br>
USE_X_FORWARDED_HOST: False<br>
USE_X_FORWARDED_PORT: False<br>
WSGI_APPLICATION: 'proj.wsgi.application'<br>
X_FRAME_OPTIONS: 'SAMEORIGIN'<br>
YEAR_MONTH_FORMAT: 'F Y'<br>
is_overridden: &lt;bound method Settings.is_overridden of &lt;Settings "proj.settings"&gt;&gt;</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<p dir="auto">I reproduced this on my on project and on the django - celery example <a href="https://github.com/celery/celery/tree/master/examples/django">https://github.com/celery/celery/tree/master/examples/django</a></p>
<ul dir="auto">
<li>Go to tasks.py on the default django - celery example and include "import requests"</li>
<li>Start celery worker <code class="notranslate">celery -A proj worker -B -l info</code></li>
<li>Celery will not list the tasks inside that file</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
amqp==2.4.2
billiard==3.6.0.0
celery==4.3.0
certifi==2019.3.9
Django==2.1.7
django-pandas==0.6.0
huey==1.11.0
kombu==4.5.0
numpy==1.16.2
pandas==0.24.2
psycopg2==2.7.7
psycopg2-binary==2.7.7
python-dateutil==2.8.0
pytz==2018.9
redis==3.2.0
six==1.12.0
vine==1.3.0
</p>
</details>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br>
for similar or identical feature requests.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?utf8=%E2%9C%93&amp;q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br>
for existing proposed implementations of this feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the if the same feature was already implemented in the<br>
master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Brief Summary</h1>

<p dir="auto">How should I maintain a connection to broker in worker so that when I do the task, I can publish messages to broker?</p>
<h1 dir="auto">Design</h1>
<h2 dir="auto">Architectural Considerations</h2>

<p dir="auto">None</p>
<h2 dir="auto">Proposed Behavior</h2>

<h2 dir="auto">Proposed UI/UX</h2>

<h2 dir="auto">Diagrams</h2>

<p dir="auto">N/A</p>
<h2 dir="auto">Alternatives</h2>

<p dir="auto">None</p>