title: Register class-based task in
body: <p>I am using Celery version 4.0.2.</p>
  
  <p>Compared to previous versions of Celery, it seems that class-based tasks are not registered automatically (i.e. if you configured auto-discovery).</p>
  
  <p>However, I do not even achieve registering a class-based task manually.</p>
  
  <p>According to the Celery change log:</p>
  
  <p><a href="http://docs.celeryproject.org/en/latest/changelog.html#version-4-0-1" rel="nofollow noreferrer">http://docs.celeryproject.org/en/latest/changelog.html#version-4-0-1</a></p>
  
  <p>since version 4.0.1 it should be possible to register the task manually:</p>
  
  <pre><code>from celery import Celery, Task
  app = Celery()
  
  class CustomTask(Task):
  
      def run(self):
          return 'hello'
  
  app.register_task(CustomTask())
  </code></pre>
  
  <p>But this does not seem to work. Does anyone know how to achieve this?</p>
  
  <p>I tried a few suggestions which are being discussed (apart from integrating a custom task loader mentioned in <a href="https://github.com/celery/celery/issues/3744" rel="nofollow noreferrer">https://github.com/celery/celery/issues/3744</a>):</p>
  
  <p><a href="https://stackoverflow.com/questions/41788017/register-celery-class-based-task">Register Celery Class-based Task</a></p>
  
  <p><a href="https://github.com/celery/celery/issues/3615" rel="nofollow noreferrer">https://github.com/celery/celery/issues/3615</a></p>
  
  <p><a href="https://github.com/celery/celery/issues/3744" rel="nofollow noreferrer">https://github.com/celery/celery/issues/3744</a></p>