title: Celery tasks immediately autodiscover
body: <p>I am trying to build an application on top of Celery framework.</p>
  
  <p>I have a module <code>settings/celery_settings.py</code> with the code that initializes Celery application like this (I expand some variables):</p>
  
  <pre><code>from __future__ import absolute_import
  from celery import Celery
  
  pfiles = ['other_tasks.test123', 'balance_log.balance_log']
  app = Celery('myapp')
  # here I just have some parameters defined like broker, result backend, etc
  # app.config_from_object(settings)
  
  # TRYING to discover tasks
  app.autodiscover_tasks(pfiles)
  </code></pre>
  
  <p>Files <code>other_tasks/test123.py</code> and <code>balance_log/balance_log.py</code> contain task definitions like these:</p>
  
  <pre><code># file other_tasks/test123.py
  from celery import shared_task, Task
  
  @shared_task()
  def mytask():
      print("Test 1234!")
  
  class TestTask01(Task):
  
      def run(self, client_id=None):
          logger.debug("TestTask01: run")
          return client_id
  </code></pre>
  
  <p>I run celery worker:</p>
  
  <pre><code>python3 /usr/local/bin/celery -A settings.celery_settings worker
  </code></pre>
  
  <p>And this way it <strong>can discover</strong> tasks. I can call these tasks.</p>
  
  <p>But then I try to use IPython:</p>
  
  <pre><code>In [1]: from settings.celery_settings import app
  
  In [2]: app.tasks
  Out[2]: 
  {'celery.backend_cleanup': &lt;@task: celery.backend_cleanup of XExchange:0x7f9f50267ac8&gt;,
   'celery.chain': &lt;@task: celery.chain of XExchange:0x7f9f50267ac8&gt;,
   'celery.chord': &lt;@task: celery.chord of XExchange:0x7f9f50267ac8&gt;,
   'celery.chord_unlock': &lt;@task: celery.chord_unlock of XExchange:0x7f9f50267ac8&gt;,
   'celery.chunks': &lt;@task: celery.chunks of XExchange:0x7f9f50267ac8&gt;,
   'celery.group': &lt;@task: celery.group of XExchange:0x7f9f50267ac8&gt;,
   'celery.map': &lt;@task: celery.map of XExchange:0x7f9f50267ac8&gt;,
   'celery.starmap': &lt;@task: celery.starmap of XExchange:0x7f9f50267ac8&gt;}
  </code></pre>
  
  <p>And apparently it <strong>does not</strong> discover the tasks.</p>
  
  <p>It seems that when I call tasks explicitly, I first import them and specify exact path for the celery while call. That's why it works.</p>
  
  <p>Question: how do I make them discovered to have a list of known tasks?</p>