title: How to stop celery task while it is being executed and continue the execution after some time?
body: <p>I have the following celery task(simplified), which interacts with Twitter API.</p>
  
  <pre><code>@app.task
  def get_followers(screen_name, **kwargs):
      cursor = kwargs.get('cursor', -1)
      followers = kwargs.get('followers', [])
      while True:
          response = twitter_api.call('followers', 'ids', screen_name=screen_name, cursor=cursor)
          if response.status_code == '429': # RATE LIMIT EXCEEDED
              # do something here
  
          cursor = response.json()['next_cursor']
          if cursor == 0: # we're done
              break
      return followers
  </code></pre>
  
  <p>I want to be able to pause task for some time when the rate limit is hit, and resume the execution from the point where it left off. (Or throw an error and retry the task, passing in additional kwargs). How can this be accomplished?</p>