Issue 1:
Checklist

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Related Issues

None

Possible Duplicates

None

Environment & Settings

4.3.0 (rhubarb):

celery report Output:

software -> celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.7.2

billiard:3.6.0.0 py-amqp:2.4.2

platform -> system:Linux arch:64bit

kernel version:4.15.0-46-generic imp:CPython

loader -> celery.loaders.app.AppLoader

settings -> transport:amqp results:disabled

ABSOLUTE_URL_OVERRIDES: {

}

ADMINS:

()

ALLOWED_HOSTS: []

APPEND_SLASH: True

AUTHENTICATION_BACKENDS: ['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS: ''

AUTH_USER_MODEL: 'auth.User'

CACHES: {

'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS: 'default'

CACHE_MIDDLEWARE_KEY_PREFIX: ''

CACHE_MIDDLEWARE_SECONDS: 600

CELERY_BROKER_URL: 'amqp://guest:@localhost:5672//'

CSRF_COOKIE_AGE: 31449600

CSRF_COOKIE_DOMAIN: None

CSRF_COOKIE_HTTPONLY: False

CSRF_COOKIE_NAME: 'csrftoken'

CSRF_COOKIE_PATH: '/'

CSRF_COOKIE_SAMESITE: 'Lax'

CSRF_COOKIE_SECURE: False

CSRF_FAILURE_VIEW: 'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME: 'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS: []

CSRF_USE_SESSIONS: False

DATABASES: {

'default': { 'ATOMIC_REQUESTS': False,

'AUTOCOMMIT': True,

'CONN_MAX_AGE': 0,

'ENGINE': 'django.db.backends.sqlite3',

'HOST': '',

'NAME': 'test.db',

'OPTIONS': {},

'PASSWORD': '',

'PORT': '',

'TEST': { 'CHARSET': None,

'COLLATION': None,

'MIRROR': None,

'NAME': None},

'TIME_ZONE': None,

'USER': ''}}

DATABASE_ROUTERS: ''

DATA_UPLOAD_MAX_MEMORY_SIZE: 2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000

DATETIME_FORMAT: 'N j, Y, P'

DATETIME_INPUT_FORMATS: ['%Y-%m-%d %H:%M:%S',

'%Y-%m-%d %H:%M:%S.%f',

'%Y-%m-%d %H:%M',

'%Y-%m-%d',

'%m/%d/%Y %H:%M:%S',

'%m/%d/%Y %H:%M:%S.%f',

'%m/%d/%Y %H:%M',

'%m/%d/%Y',

'%m/%d/%y %H:%M:%S',

'%m/%d/%y %H:%M:%S.%f',

'%m/%d/%y %H:%M',

'%m/%d/%y']

DATE_FORMAT: 'N j, Y'

DATE_INPUT_FORMATS: ['%Y-%m-%d',

'%m/%d/%Y',

'%m/%d/%y',

'%b %d %Y',

'%b %d, %Y',

'%d %b %Y',

'%d %b, %Y',

'%B %d %Y',

'%B %d, %Y',

'%d %B %Y',

'%d %B, %Y']

DEBUG: True

DEBUG_PROPAGATE_EXCEPTIONS: False

DECIMAL_SEPARATOR: '.'

DEFAULT_CHARSET: 'utf-8'

DEFAULT_CONTENT_TYPE: 'text/html'

DEFAULT_EXCEPTION_REPORTER_FILTER: 'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL: 'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE: ''

DEFAULT_TABLESPACE: ''

DISALLOWED_USER_AGENTS: []

EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST: 'localhost'

EMAIL_HOST_PASSWORD: ''

EMAIL_HOST_USER: ''

EMAIL_PORT: 25

EMAIL_SSL_CERTFILE: None

EMAIL_SSL_KEYFILE: ''

EMAIL_SUBJECT_PREFIX: '[Django] '

EMAIL_TIMEOUT: None

EMAIL_USE_LOCALTIME: False

EMAIL_USE_SSL: False

EMAIL_USE_TLS: False

FILE_CHARSET: 'utf-8'

FILE_UPLOAD_DIRECTORY_PERMISSIONS: None

FILE_UPLOAD_HANDLERS: ['django.core.files.uploadhandler.MemoryFileUploadHandler',

'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE: 2621440

FILE_UPLOAD_PERMISSIONS: None

FILE_UPLOAD_TEMP_DIR: None

FIRST_DAY_OF_WEEK: 0

FIXTURE_DIRS: []

FORCE_SCRIPT_NAME: None

FORMAT_MODULE_PATH: None

FORM_RENDERER: 'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS: []

INSTALLED_APPS:

('django.contrib.auth',

'django.contrib.contenttypes',

'django.contrib.sessions',

'django.contrib.sites',

'django.contrib.messages',

'django.contrib.staticfiles',

'django.contrib.admin',

'demoapp')

INTERNAL_IPS: []

LANGUAGES: [('af', 'Afrikaans'),

('ar', 'Arabic'),

('ast', 'Asturian'),

('az', 'Azerbaijani'),

('bg', 'Bulgarian'),

('be', 'Belarusian'),

('bn', 'Bengali'),

('br', 'Breton'),

('bs', 'Bosnian'),

('ca', 'Catalan'),

('cs', 'Czech'),

('cy', 'Welsh'),

('da', 'Danish'),

('de', 'German'),

('dsb', 'Lower Sorbian'),

('el', 'Greek'),

('en', 'English'),

('en-au', 'Australian English'),

('en-gb', 'British English'),

('eo', 'Esperanto'),

('es', 'Spanish'),

('es-ar', 'Argentinian Spanish'),

('es-co', 'Colombian Spanish'),

('es-mx', 'Mexican Spanish'),

('es-ni', 'Nicaraguan Spanish'),

('es-ve', 'Venezuelan Spanish'),

('et', 'Estonian'),

('eu', 'Basque'),

('fa', 'Persian'),

('fi', 'Finnish'),

('fr', 'French'),

('fy', 'Frisian'),

('ga', 'Irish'),

('gd', 'Scottish Gaelic'),

('gl', 'Galician'),

('he', 'Hebrew'),

('hi', 'Hindi'),

('hr', 'Croatian'),

('hsb', 'Upper Sorbian'),

('hu', 'Hungarian'),

('ia', 'Interlingua'),

('id', 'Indonesian'),

('io', 'Ido'),

('is', 'Icelandic'),

('it', 'Italian'),

('ja', 'Japanese'),

('ka', 'Georgian'),

('kab', 'Kabyle'),

('kk', 'Kazakh'),

('km', 'Khmer'),

('kn', 'Kannada'),

('ko', 'Korean'),

('lb', 'Luxembourgish'),

('lt', 'Lithuanian'),

('lv', 'Latvian'),

('mk', 'Macedonian'),

('ml', 'Malayalam'),

('mn', 'Mongolian'),

('mr', 'Marathi'),

('my', 'Burmese'),

('nb', 'Norwegian Bokmål'),

('ne', 'Nepali'),

('nl', 'Dutch'),

('nn', 'Norwegian Nynorsk'),

('os', 'Ossetic'),

('pa', 'Punjabi'),

('pl', 'Polish'),

('pt', 'Portuguese'),

('pt-br', 'Brazilian Portuguese'),

('ro', 'Romanian'),

('ru', 'Russian'),

('sk', 'Slovak'),

('sl', 'Slovenian'),

('sq', 'Albanian'),

('sr', 'Serbian'),

('sr-latn', 'Serbian Latin'),

('sv', 'Swedish'),

('sw', 'Swahili'),

('ta', 'Tamil'),

('te', 'Telugu'),

('th', 'Thai'),

('tr', 'Turkish'),

('tt', 'Tatar'),

('udm', 'Udmurt'),

('uk', 'Ukrainian'),

('ur', 'Urdu'),

('vi', 'Vietnamese'),

('zh-hans', 'Simplified Chinese'),

('zh-hant', 'Traditional Chinese')]

LANGUAGES_BIDI: ['he', 'ar', 'fa', 'ur']

LANGUAGE_CODE: 'en-us'

LANGUAGE_COOKIE_AGE: None

LANGUAGE_COOKIE_DOMAIN: None

LANGUAGE_COOKIE_NAME: 'django_language'

LANGUAGE_COOKIE_PATH: '/'

LOCALE_PATHS: []

LOGGING: {

'disable_existing_loggers': False,

'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse'}},

'handlers': { 'mail_admins': { 'class': 'django.utils.log.AdminEmailHandler',

'filters': ['require_debug_false'],

'level': 'ERROR'}},

'loggers': { 'django.request': { 'handlers': ['mail_admins'],

'level': 'ERROR',

'propagate': True}},

'version': 1}

LOGGING_CONFIG: 'logging.config.dictConfig'

LOGIN_REDIRECT_URL: '/accounts/profile/'

LOGIN_URL: '/accounts/login/'

LOGOUT_REDIRECT_URL: None

MANAGERS:

()

MEDIA_ROOT: ''

MEDIA_URL: ''

MESSAGE_STORAGE: 'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE: []

MIDDLEWARE_CLASSES:

('django.middleware.common.CommonMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',

'django.middleware.csrf.CsrfViewMiddleware',

'django.contrib.auth.middleware.AuthenticationMiddleware',

'django.contrib.messages.middleware.MessageMiddleware')

MIGRATION_MODULES: {

}

MONTH_DAY_FORMAT: 'F j'

NUMBER_GROUPING: 0

PASSWORD_HASHERS: ''

PASSWORD_RESET_TIMEOUT_DAYS: ''

PREPEND_WWW: False

ROOT_URLCONF: 'proj.urls'

SECRET_KEY: ''

SECURE_BROWSER_XSS_FILTER: False

SECURE_CONTENT_TYPE_NOSNIFF: False

SECURE_HSTS_INCLUDE_SUBDOMAINS: False

SECURE_HSTS_PRELOAD: False

SECURE_HSTS_SECONDS: 0

SECURE_PROXY_SSL_HEADER: None

SECURE_REDIRECT_EXEMPT: []

SECURE_SSL_HOST: None

SECURE_SSL_REDIRECT: False

SERVER_EMAIL: 'root@localhost'

SESSION_CACHE_ALIAS: 'default'

SESSION_COOKIE_AGE: 1209600

SESSION_COOKIE_DOMAIN: None

SESSION_COOKIE_HTTPONLY: True

SESSION_COOKIE_NAME: 'sessionid'

SESSION_COOKIE_PATH: '/'

SESSION_COOKIE_SAMESITE: 'Lax'

SESSION_COOKIE_SECURE: False

SESSION_ENGINE: 'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE: False

SESSION_FILE_PATH: None

SESSION_SAVE_EVERY_REQUEST: False

SESSION_SERIALIZER: 'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE: 'proj.settings'

SHORT_DATETIME_FORMAT: 'm/d/Y P'

SHORT_DATE_FORMAT: 'm/d/Y'

SIGNING_BACKEND: 'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS: []

SITE_ID: 1

STATICFILES_DIRS:

()

STATICFILES_FINDERS:

('django.contrib.staticfiles.finders.FileSystemFinder',

'django.contrib.staticfiles.finders.AppDirectoriesFinder')

STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT: ''

STATIC_URL: '/static/'

TEMPLATES: []

TEMPLATE_DEBUG: True

TEMPLATE_DIRS:

()

TEMPLATE_LOADERS:

('django.template.loaders.filesystem.Loader',

'django.template.loaders.app_directories.Loader')

TEST_NON_SERIALIZED_APPS: []

TEST_RUNNER: 'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR: ','

TIME_FORMAT: 'P'

TIME_INPUT_FORMATS: ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE: 'America/Chicago'

USE_I18N: True

USE_L10N: True

USE_THOUSAND_SEPARATOR: False

USE_TZ: True

USE_X_FORWARDED_HOST: False

USE_X_FORWARDED_PORT: False

WSGI_APPLICATION: 'proj.wsgi.application'

X_FRAME_OPTIONS: 'SAMEORIGIN'

YEAR_MONTH_FORMAT: 'F Y'

is_overridden: <bound method Settings.is_overridden of <Settings "proj.settings">>

Steps to Reproduce

I reproduced this on my on project and on the django - celery example https://github.com/celery/celery/tree/master/examples/django

Go to tasks.py on the default django - celery example and include "import requests"

Start celery worker celery -A proj worker -B -l info

Celery will not list the tasks inside that file

Python Packages

pip freeze Output:

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

Issue 2:
Checklist

I have checked the issues list

for similar or identical feature requests.

I have checked the pull requests list

for existing proposed implementations of this feature.

I have checked the commit log

to find out if the if the same feature was already implemented in the

master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Brief Summary

How should I maintain a connection to broker in worker so that when I do the task, I can publish messages to broker?

Design

Architectural Considerations

None

Proposed Behavior

Proposed UI/UX

Diagrams

N/A

Alternatives

None