public/wordpress/wp-content/plugins/backupbuddy/destinations/live/live.php
// $force_use_jump_transient forces use of transient method instead of running now to prevent issues queing from within a periodic function step.
$force_use_jump_transient forces use of transient method instead of running now to prevent issues queing from within a periodic function step.
$force_use_jump_transient forces use of transient method instead of running now to prevent issues queing from within a periodic function step .
public static function queue_step( $step, $args = array(), $skip_run_now = false, $force_run_now = false ) {
		$run_now = false;
		$state = backupbuddy_live_periodic::get_stats();
		$assume_timed_out_after = backupbuddy_core::adjustedMaxExecutionTime() + backupbuddy_constants::TIMED_OUT_PROCESS_RESUME_WIGGLE_ROOM;
		if ( 'daily_init' == $state['step']['function'] ) { 
			$run_now = true;
		} elseif ( time() - $state['stats']['last_activity'] > $assume_timed_out_after ) { 
			$run_now = true;
		}
		set_transient( 'backupbuddy_live_jump', array( $step, $args ), 60*60*48 ); 
		if ( ( true === $force_run_now ) || ( ( true === $run_now ) && ( false === $skip_run_now ) ) ) {
			backupbuddy_live_periodic::_set_next_step( $step, $args, $save_now_and_unlock = true );
			$schedule_result = backupbuddy_core::schedule_single_event( time(), 'live_periodic', $cronArgs = array() );
			if ( true === $schedule_result ) {
				pb_backupbuddy::status( 'details', 'Live Periodic chunk step cron event for step `' . $step . '` scheduled.' );
			} else {
				pb_backupbuddy::status( 'error', 'Next Live Periodic chunk step cron event for step `' . $step . '` FAILED to be scheduled.' );
			}
			if ( '1' != pb_backupbuddy::$options['skip_spawn_cron_call'] ) {
				pb_backupbuddy::status( 'details', 'Spawning cron now.' );
				update_option( '_transient_doing_cron', 0 ); 
				spawn_cron( time() + 150 ); 
			}
		} else { 
			//set_transient( 'backupbuddy_live_jump', array( $step, $args ), 60*60*48 ); 
		}
	}
public static function queue_step ( $ step , $ args = array ( ) , $ skip_run_now = false , $ force_run_now = false ) { $ run_now = false ; $ state = backupbuddy_live_periodic :: get_stats ( ) ; $ assume_timed_out_after = backupbuddy_core :: adjustedMaxExecutionTime ( ) + backupbuddy_constants :: TIMED_OUT_PROCESS_RESUME_WIGGLE_ROOM ; if ( 'daily_init' == $ state [ 'step' ] [ 'function' ] ) { $ run_now = true ; } elseif ( time ( ) - $ state [ 'stats' ] [ 'last_activity' ] > $ assume_timed_out_after ) { $ run_now = true ; } set_transient ( 'backupbuddy_live_jump' , array ( $ step , $ args ) , 60 * 60 * 48 ) ; if ( ( true === $ force_run_now ) || ( ( true === $ run_now ) && ( false === $ skip_run_now ) ) ) { backupbuddy_live_periodic :: _set_next_step ( $ step , $ args , $ save_now_and_unlock = true ) ; $ schedule_result = backupbuddy_core :: schedule_single_event ( time ( ) , 'live_periodic' , $ cronArgs = array ( ) ) ; if ( true === $ schedule_result ) { pb_backupbuddy :: status ( 'details' , 'Live Periodic chunk step cron event for step `' . $ step . '` scheduled.' ) ; } else { pb_backupbuddy :: status ( 'error' , 'Next Live Periodic chunk step cron event for step `' . $ step . '` FAILED to be scheduled.' ) ; } if ( '1' != pb_backupbuddy :: $ options [ 'skip_spawn_cron_call' ] ) { pb_backupbuddy :: status ( 'details' , 'Spawning cron now.' ) ; update_option ( '_transient_doing_cron' , 0 ) ; spawn_cron ( time ( ) + 150 ) ; } } else { } }
$force_use_jump_transient forces use of transient method instead of running now to prevent issues queing from within a periodic function step.
$force_use_jump_transient forces use of transient method instead of running now to prevent issues queing from within a periodic function step .
// Currently idling so okay to run now. // Probably timed out so okay to run now. // Tells Live process to restart from the beginning (if mid-process) so new settigns apply. // Prevent cron-blocking for next item. // Adds > 60 seconds to get around once per minute cron running limit. // Already running. Trigger to restart at beginning. //set_transient( 'backupbuddy_live_jump', array( $step, $args ), 60*60*48 ); // Tells Live process to restart from the beginning (if mid-process) so new settigns apply.