Пример #1
0
 /**
  * Schedule a retry if a temporary failure has occurred.
  *
  * @since 2.0.0
  *
  * @param array $response
  * @return bool Whether a retry has been rescheduled.
  */
 protected function reschedule($response)
 {
     $rescheduler = Prompt_Factory::make_rescheduler($response, $this->retry_wait_seconds);
     if ($rescheduler->found_temporary_error()) {
         $this->batch->clear_for_retry();
         $rescheduler->reschedule('prompt/comment_mailing/send_notifications', array($this->comment->comment_ID, 'rescheduled', null));
         return true;
     }
     return false;
 }
Пример #2
0
 /**
  *
  * @since 2.0.0
  *
  */
 protected function schedule_next_chunk()
 {
     $this->client->post_instant_callback(array('metadata' => array('prompt/comment_mailing/send_notifications', array($this->batch->get_comment()->comment_ID))));
 }