title: celery task not processed by celery
body: <p>total celery and django noob here, so sorry if the problem is trivial. Basically the problem is that any function defined by @app.task is not being processed by celery, it just runs normally as if celery isn't there.</p>
  
  <p>My celery_app.py file is - </p>
  
  <pre><code>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', 'project.settings')
  
  app = Celery(broker=settings.CELERY_BROKER_URL)
  app.config_from_object('django.conf:settings')
  app.autodiscover_tasks()
  
  if __name__ == '__main__':
      app.start()
  </code></pre>
  
  <p>While my tasks.py file is - </p>
  
  <pre><code>from project.celery_app import app
  
  @app.task
  def mytask():
      ...
  </code></pre>
  
  <p>I get the following output on running celery in the terminal - </p>
  
  <pre><code> -------------- celery@LAPTOP v4.1.0 (latentcall)
  ---- **** -----
  --- * ***  * -- Windows-10-10.0.16299-SP0 2017-12-20 19:27:24
  -- * - **** ---
  - ** ---------- [config]
  - ** ---------- .&gt; app:         __main__:0x229ce2884e0
  - ** ---------- .&gt; transport:   amqp://user:**@localhost:5672/myvhost
  - ** ---------- .&gt; results:     disabled://
  - *** --- * --- .&gt; concurrency: 8 (solo)
  -- ******* ---- .&gt; task events: OFF (enable -E to monitor tasks in this         worker)
  --- ***** -----
   -------------- [queues]
                  .&gt; celery           exchange=celery(direct) key=celery
  
  
  [tasks]
    . account.tasks.mytask
  
  [2017-12-20 19:27:24,085: INFO/MainProcess] Connected to     amqp://user:**@127.0.0.1:5672/myvhost
  [2017-12-20 19:27:24,101: INFO/MainProcess] mingle: searching for neighbors
  [2017-12-20 19:27:25,126: INFO/MainProcess] mingle: all alone
  [2017-12-20 19:27:25,141: WARNING/MainProcess]     c:\programdata\anaconda2\envs\myenv\lib\site-    packages\celery\fixups\django.py:202: 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 leak, never '
  [2017-12-20 19:27:25,141: INFO/MainProcess] celery@LAPTOP- ready.
  </code></pre>
  
  <p>So my task is known to celery, but it doesn't do anything about it. The task runs on a button click, and using -loglevel=debug it is seen that celery isn't affected by it. I am using RabbitMQ as broker, celery 4.1.0, python3 and django-1.10.5. Any help would be greatly appreciated!</p>