コード例 #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()) {
         $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
 /**
  *
  * @since 2.0.0
  *
  * @param string $batch_key
  */
 protected function schedule_next_chunk($batch_key)
 {
     $option_key = 'prompt_ac_' . $batch_key;
     update_option($option_key, array($this->batch->get_lists(), $this->batch->get_users_data(), $this->batch->get_message_data(), $this->chunk + 1), false);
     $this->client->post_instant_callback(array('metadata' => array('prompt/subscription_mailing/send_cached_invites', array($option_key))));
 }