/**
  * 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()) {
         $rescheduler->reschedule('prompt/subscription_mailing/send_agreements', array($this->batch->get_lists(), $this->batch->get_users_data(), $this->batch->get_message_data(), 0));
         return true;
     }
     return false;
 }
示例#2
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()) {
         $rescheduler->reschedule('prompt/post_mailing/send_notifications', array($this->batch->get_context()->get_post()->id(), 'reschedule'));
         return true;
     }
     return false;
 }
示例#3
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;
 }
示例#4
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()) {
         $rescheduler->reschedule('prompt/mailing/send', array('batch' => $this->batch));
         return true;
     }
     return false;
 }