public/wordpress/wp-content/plugins/backupbuddy/classes/core.php
/* remoteSendRetry()
	 *
	 * Returns true if resending or false if retry limit already met.
	 *
	 */
remoteSendRetry()
Returns true if resending or false if retry limit already met.
remoteSendRetry () Returns true if resending or false if retry limit already met .
public static function remoteSendRetry( &$fileoptions_obj, $send_id, $maximumRetries = 1 ) {
		if ( isset( $fileoptions_obj->options['destinationSettings'] ) && ( count( $fileoptions_obj->options['destinationSettings'] ) > 0 ) ) {
			$destination_settings = $fileoptions_obj->options['destinationSettings']; 
			$delete_after = $fileoptions_obj->options['deleteAfter'];
			$retries = $fileoptions_obj->options['retries'];
			$file = $fileoptions_obj->options['file'];
			if ( $retries < $maximumRetries ) {
				pb_backupbuddy::status( 'details', 'Timed out remote send has not exceeded retry limit (`' . $maximumRetries . '`). Trying to send again.' );
				pb_backupbuddy::status( 'details', 'Scheduling cron to send to this remote destination...' );
				$cronArgs = array(
					$destination_settings,
					$file,
					$send_id,
					$delete_after,
					$identifier = '',
					$isRetry = true
				);
				$schedule_result = backupbuddy_core::schedule_single_event( time(), 'destination_send', $cronArgs );
				if ( $schedule_result === FALSE ) {
					$error = 'Error scheduling file transfer. Please check your BackupBuddy error log for details. A plugin may have prevented scheduling or the database rejected it.';
					pb_backupbuddy::status( 'error', $error );
					echo $error;
				} else {
					pb_backupbuddy::status( 'details', 'Cron to send to remote destination scheduled.' );
				}
				if ( '1' != pb_backupbuddy::$options['skip_spawn_cron_call'] ) {
					update_option( '_transient_doing_cron', 0 ); 
					spawn_cron( time() + 150 ); 
				}
				return true;
			} else {
				pb_backupbuddy::status( 'details', 'Maximum remote send timeout retries (`' . $maximumRetries . '`) passed to function met. Not resending.' );
				return false;
			}
		}
	}
public static function remoteSendRetry ( & $ fileoptions_obj , $ send_id , $ maximumRetries = 1 ) { if ( isset ( $ fileoptions_obj -> options [ 'destinationSettings' ] ) && ( count ( $ fileoptions_obj -> options [ 'destinationSettings' ] ) > 0 ) ) { $ destination_settings = $ fileoptions_obj -> options [ 'destinationSettings' ] ; $ delete_after = $ fileoptions_obj -> options [ 'deleteAfter' ] ; $ retries = $ fileoptions_obj -> options [ 'retries' ] ; $ file = $ fileoptions_obj -> options [ 'file' ] ; if ( $ retries < $ maximumRetries ) { pb_backupbuddy :: status ( 'details' , 'Timed out remote send has not exceeded retry limit (`' . $ maximumRetries . '`). Trying to send again.' ) ; pb_backupbuddy :: status ( 'details' , 'Scheduling cron to send to this remote destination...' ) ; $ cronArgs = array ( $ destination_settings , $ file , $ send_id , $ delete_after , $ identifier = '' , $ isRetry = true ) ; $ schedule_result = backupbuddy_core :: schedule_single_event ( time ( ) , 'destination_send' , $ cronArgs ) ; if ( $ schedule_result === FALSE ) { $ error = 'Error scheduling file transfer. Please check your BackupBuddy error log for details. A plugin may have prevented scheduling or the database rejected it.' ; pb_backupbuddy :: status ( 'error' , $ error ) ; echo $ error ; } else { pb_backupbuddy :: status ( 'details' , 'Cron to send to remote destination scheduled.' ) ; } if ( '1' != pb_backupbuddy :: $ options [ 'skip_spawn_cron_call' ] ) { update_option ( '_transient_doing_cron' , 0 ) ; spawn_cron ( time ( ) + 150 ) ; } return true ; } else { pb_backupbuddy :: status ( 'details' , 'Maximum remote send timeout retries (`' . $ maximumRetries . '`) passed to function met. Not resending.' ) ; return false ; } } }
remoteSendRetry()
 Returns true if resending or false if retry limit already met.
remoteSendRetry () Returns true if resending or false if retry limit already met .
// Destination settings are stored for this destination so see if we can retry sending it (if settings permit). /*
			echo '<pre>';
			print_r( $fileoptions_obj->options );
			echo '</pre>';
			*/ // these are the latest; includes info needed for chunking too. //$send_id = $fileoptions_obj->options['sendID']; //$fileoptions_obj->options['retries']++; //$fileoptions_obj->save(); // NOTE: Retry count now updates in bootstrap.php send() function. Only leaving this here temporarily to help get rid of failed resends from accumulating with old format. // Schedule send of this piece. /*
				echo 'cronargs: ';
				echo '<pre>';
				print_r( $cronArgs );
				echo '</pre>';
				*/ // Prevent cron-blocking for next item. // Adds > 60 seconds to get around once per minute cron running limit.