title: Django Celery task doesn't fire in development
body: <p>I'm trying to make use of periodic tasks but can't make it work.</p>
  <p>I have this test task</p>
  <pre><code># handler/tasks.py
  
  from celery import Celery
  
  app = Celery()
  
  
  @app.on_after_configure.connect
  def setup_periodic_tasks(sender, **kwargs):
      # Calls test('hello') every 2 seconds.
      sender.add_periodic_task(2, test.s('hello'), name='add every 2')
  
  
  @app.task
  def test(arg):
      print(arg)
  </code></pre>
  <p>Celery is configured</p>
  <pre><code># project dir
  # salaryx_django/celery.py
  
  from __future__ import absolute_import
  import os
  from celery import Celery
  from django.conf import settings
  
  # set the default Django settings module for the 'celery' program.
  os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'salaryx_django.settings')
  app = Celery('salaryx_django')
  
  # Using a string here means the worker will not have to
  # pickle the object when using Windows.
  app.config_from_object('django.conf:settings')
  app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
  
  
  @app.task(bind=True)
  def debug_task(self):
      print('Request: {0!r}'.format(self.request))
  </code></pre>
  <pre><code># salaryx_django/settings.py
  
  # CELERY STUFF
  BROKER_URL = 'redis://localhost:6379'
  CELERY_RESULT_BACKEND = 'redis://localhost:6379'
  CELERY_ACCEPT_CONTENT = ['application/json']
  CELERY_TASK_SERIALIZER = 'json'
  CELERY_RESULT_SERIALIZER = 'json'
  CELERY_TIMEZONE = 'Europe/London'
  </code></pre>
  <p>The workers are intiated</p>
  <pre><code>[2022-04-25 14:57:55,424: INFO/MainProcess] Connected to redis://localhost:6379//
  [2022-04-25 14:57:55,426: INFO/MainProcess] mingle: searching for neighbors
  [2022-04-25 14:57:56,433: INFO/MainProcess] mingle: all alone
  [2022-04-25 14:57:56,452: WARNING/MainProcess] /Users/jonas/Desktop/salaryx_django/venv/lib/python3.8/site-packages/celery/fixups/django.py:203: UserWarning: Using settings.DEBUG leads to a memory
              leak, never use this setting in production environments!
    warnings.warn('''Using settings.DEBUG leads to a memory
  
  [2022-04-25 14:57:56,453: INFO/MainProcess] celery@Air-von-Jonas ready.
  </code></pre>
  <p>and Redis is waiting for connections</p>
  <p><a href="https://i.stack.imgur.com/40PKy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/40PKy.png" alt="enter image description here" /></a></p>
  <p>but nothing happens at all..</p>
  <p>Celery Beat</p>
  <pre><code>(venv) jonas@Air-von-Jonas salaryx_django % celery -A salaryx_django beat
  celery beat v5.2.6 (dawn-chorus) is starting.
  __    -    ... __   -        _
  LocalTime -&gt; 2022-04-26 05:38:27
  Configuration -&gt;
      . broker -&gt; redis://localhost:6379//
      . loader -&gt; celery.loaders.app.AppLoader
      . scheduler -&gt; celery.beat.PersistentScheduler
      . db -&gt; celerybeat-schedule
      . logfile -&gt; [stderr]@%WARNING
      . maxinterval -&gt; 5.00 minutes (300s)
  </code></pre>