title: wp-async-task don't fire run_action method
body: <p>I have to work with the techcrunch <a href="https://github.com/techcrunch/wp-async-task" rel="nofollow">wp-async-task</a> to run a synchronization task in background in my <strong>wordpress plugin</strong>.</p>
  
  <p>So to test, at the bottom of the main file I have :</p>
  
  <pre><code>//top of the php file
  require_once(dirname(__FILE__) . '/lib/WP_Async_Task.php');
  require_once(dirname(__FILE__) . '/class/my_api_status.class.php');
  define('API_URL', '...');
  
  /* ... */
  
  // At the bottom of the file
  function my_api_status($api_url)
  {
    sleep(5);
    $r = wp_safe_remote_get($api_url);
    if (!is_wp_error($r)) {
      $body = json_decode(wp_remote_retrieve_body($r));
      if (isset($body-&gt;success)) {
        return;
      }
    }
  }
  add_action('wp_async_api_status', 'my_api_status');
  
  function my_init_api_status()
  {
    new ApiStatusTask();
    do_action('api_status', constant('API_URL'));
  }
  add_action('plugins_loaded', 'my_init_api_status');
  </code></pre>
  
  <p>And api status task class</p>
  
  <pre><code>class ApiStatusTask extends WP_Async_Task {
  
    protected $action = 'api_status';
  
    /**
     * Prepare data for the asynchronous request
     * @throws Exception If for any reason the request should not happen
     * @param array $data An array of data sent to the hook
     * @return array
     */
    protected function prepare_data( $data ) {
      return array(
        'api_url' =&gt; $data[0]
      );
    }
  
    /**
     * Run the async task action
     */
    protected function run_action() {
      if(isset($_POST['api_url'])){
        do_action("wp_async_$this-&gt;action", $_POST['api_url']);
      }
    }
  
  }
  </code></pre>
  
  <p>The function <code>prepare_data</code> is correctly called by <code>launch</code>and after that <code>launch_on_shutdown</code> is also correctly called and finally <code>wp_remote_post</code> is called at the end of <code>launch_on_shutdown</code> with <code>admin-post.php</code>.
  But the function <code>run_action</code> is never called ... and so the <code>my_api_status</code> in the main file.</p>
  
  <p>What it possibly go wrong ?</p>