title: Is Celery really async?
body: <p>I am codig a realtime game using celery and django-channels.</p>
  
  <p>I have a task that works like a timer and if this timer reaches to zero, once the task was activated, a group_send() is called. From what I see, celery tasks are async but we can't await functions inside tasks.. this makes me a little bit confused.. here is the code:</p>
  
  <pre><code>@app.task(ignore_result=True)
  def count_down(channel_name):
      set_random_game_result(channel_name)
      room = process_game_result(channel_name, revoke=False)
      channel_layer = get_channel_layer()
      async_to_sync(channel_layer.group_send)(
          channel_name,
          {
              "type": "game_room_info",
              "room": room
          }
      )
  </code></pre>
  
  <p>from the docs:</p>
  
  <blockquote>
    <p>By default the send(), group_send(), group_add() and other functions are async functions, meaning you have to await them. If you need to call them from synchronous code, you’ll need to use the handy asgiref.sync.async_to_sync wrapper</p>
  </blockquote>
  
  <p>So if celery is async, why can't I use the group_send without using the async_to_sync util?</p>
  
  <p>Another thing is about querying.. From the docs:</p>
  
  <blockquote>
    <p>If you are writing asynchronous code, however, you will need to call database methods in a safe, synchronous context, using database_sync_to_async.</p>
  </blockquote>
  
  <p><code>database_sync_to_async</code> actually doesn't work inside the task function. Am I missing something?</p>