当前位置: 首页>>代码示例>>PHP>>正文


PHP pb_backupbuddy::get_status_serial方法代码示例

本文整理汇总了PHP中pb_backupbuddy::get_status_serial方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::get_status_serial方法的具体用法?PHP pb_backupbuddy::get_status_serial怎么用?PHP pb_backupbuddy::get_status_serial使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pb_backupbuddy的用法示例。


在下文中一共展示了pb_backupbuddy::get_status_serial方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

        $file_size = $file_stats['size'];
        $file_modified = $file_stats['mtime'];
    }
    unset($file_stats);
    $integrity = array('status' => 'Unknown', 'tests' => array(), 'scan_time' => 0, 'detected_type' => 'unknown', 'size' => $file_size, 'modified' => $file_modified, 'file' => basename($file), 'comment' => false);
    $backup_options_options['integrity'] = array_merge(pb_backupbuddy::settings('backups_integrity_defaults'), $integrity);
    $backup_options->save();
    return $backup_options_options['integrity'];
}
//***** BEGIN CALCULATING STATUS DETAILS.
$backup_type = '';
if (!isset(pb_backupbuddy::$classes['zipbuddy'])) {
    require_once pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php';
    pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddy(backupbuddy_core::getBackupDirectory());
}
$previous_status_serial = pb_backupbuddy::get_status_serial();
// Store current status serial setting to reset back later.
if (true !== $skipLogRedirect) {
    pb_backupbuddy::status('details', 'Redirecting status logging temporarily.');
    pb_backupbuddy::set_status_serial('zipbuddy_test');
    // Redirect logging output to a certain log file.
}
// Look for comment.
pb_backupbuddy::status('details', 'Verifying comment in zip archive.');
$raw_comment = pb_backupbuddy::$classes['zipbuddy']->get_comment($file);
$comment = backupbuddy_core::normalize_comment_data($raw_comment);
$comment = $comment['note'];
$tests = array();
pb_backupbuddy::status('details', 'NOTE: It is normal to see several "File not found" messages in the next several log lines.');
// Check for DAT file.
$pass = false;
开发者ID:AgilData,项目名称:WordPress-Skeleton,代码行数:31,代码来源:_integrityCheck.php

示例2: backup_integrity_check

 function backup_integrity_check($file, $fileoptions = '', $options = array())
 {
     $options = array_merge(array('skip_database_dump' => '0'), $options);
     pb_backupbuddy::status('details', 'Started backup_integrity_check() function.');
     $serial = $this->get_serial_from_file($file);
     // User selected to rescan a file.
     if (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         pb_backupbuddy::alert('Rescanning backup integrity for backup file `' . basename($file) . '`');
     }
     if ($fileoptions != '') {
         $backup_options =& $fileoptions;
     } else {
         require_once pb_backupbuddy::plugin_path() . '/classes/fileoptions.php';
         $backup_options = new pb_backupbuddy_fileoptions(pb_backupbuddy::$options['log_directory'] . 'fileoptions/' . $serial . '.txt', $read_only = false, $ignore_lock = false, $create_file = true);
         // Will create file to hold integrity data if nothing exists.
         if (true !== ($result = $backup_options->is_ok())) {
             pb_backupbuddy::status('error', __('Fatal Error #9034 C. Unable to access fileoptions data.', 'it-l10n-backupbuddy') . ' Error on file `' . pb_backupbuddy::$options['log_directory'] . 'fileoptions/' . $serial . '.txt' . '`: ' . $result);
             pb_backupbuddy::status('action', 'halt_script');
             // Halt JS on page.
             return false;
         }
         if (isset($backup_options->options['profile'])) {
             $options = $backup_options->options['profile'];
             $options = array_merge(pb_backupbuddy::settings('profile_defaults'), $options);
         }
     }
     if (isset($backup_options->options['integrity']) && count($backup_options->options['integrity']) > 0 && pb_backupbuddy::_GET('reset_integrity') != $serial) {
         // Already have integrity data and NOT resetting this one.
         pb_backupbuddy::status('details', 'Integrity data for backup `' . $serial . '` is cached; not scanning again.');
         return true;
     } elseif (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         // Resetting this one.
         pb_backupbuddy::status('details', 'Resetting backup integrity stats for backup with serial `' . $serial . '`.');
     } else {
         // No integrity data; not resetting. Just keep going...
     }
     if (pb_backupbuddy::$options['profiles'][0]['integrity_check'] == '0' && pb_backupbuddy::_GET('reset_integrity') == '') {
         // Integrity checking disabled. Allows run if manually rescanning on backups page.
         pb_backupbuddy::status('details', 'Integrity check disabled. Skipping scan.');
         $file_stats = @stat($file);
         if ($file_stats === false) {
             // stat failure.
             pb_backupbuddy::status('error', 'Error #4539774. Unable to get file details ( via stat() ) for file `' . $file . '`. The file may be corrupt or too large for the server.');
             $file_size = 0;
             $file_modified = 0;
         } else {
             // stat success.
             $file_size = $file_stats['size'];
             $file_modified = $file_stats['mtime'];
         }
         unset($file_stats);
         $integrity = array('status' => 'Unknown', 'tests' => array(), 'scan_time' => 0, 'detected_type' => 'unknown', 'size' => $file_size, 'modified' => $file_modified, 'file' => basename($file), 'comment' => false);
         $backup_options->options['integrity'] = array_merge(pb_backupbuddy::settings('backups_integrity_defaults'), $integrity);
         $backup_options->save();
         return true;
     }
     //***** BEGIN CALCULATING STATUS DETAILS.
     $backup_type = '';
     if (!isset(pb_backupbuddy::$classes['zipbuddy'])) {
         require_once pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php';
         pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddy(pb_backupbuddy::$options['backup_directory']);
     }
     pb_backupbuddy::status('details', 'Redirecting status logging temporarily.');
     $previous_status_serial = pb_backupbuddy::get_status_serial();
     // Store current status serial setting to reset back later.
     pb_backupbuddy::set_status_serial('zipbuddy_test');
     // Redirect logging output to a certain log file.
     // Look for comment.
     pb_backupbuddy::status('details', 'Verifying comment in zip archive.');
     $raw_comment = pb_backupbuddy::$classes['zipbuddy']->get_comment($file);
     $comment = pb_backupbuddy::$classes['core']->normalize_comment_data($raw_comment);
     $comment = $comment['note'];
     $tests = array();
     // Check for DAT file.
     $pass = false;
     pb_backupbuddy::status('details', 'Verifying DAT file in zip archive.');
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/backupbuddy_temp/' . $serial . '/backupbuddy_dat.php') === true) {
         // Post 2.0 full backup
         $backup_type = 'full';
         $pass = true;
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/temp_' . $serial . '/backupbuddy_dat.php') === true) {
         // Pre 2.0 full backup
         $backup_type = 'full';
         $pass = true;
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'backupbuddy_dat.php') === true) {
         // DB backup
         $backup_type = 'db';
         $pass = true;
     }
     $tests[] = array('test' => 'BackupBackup data file exists', 'pass' => $pass);
     // Skip database checks if needed.
     //if ( $options['skip_database_dump'] != '1' ) {
     // Check for DB SQL file.
     $pass = false;
     pb_backupbuddy::status('details', 'Verifying database SQL file in zip archive.');
     if ($options['skip_database_dump'] == '1') {
         pb_backupbuddy::status('warning', 'WARNING: Database .SQL file does NOT exist because the database dump has been set to be SKIPPED based on settings. Use with cuation!');
     } else {
//.........这里部分代码省略.........
开发者ID:mariakhair,项目名称:bootstrap,代码行数:101,代码来源:core.php

示例3: backup_integrity_check

 function backup_integrity_check($file)
 {
     pb_backupbuddy::status('details', 'Started backup_integrity_check() function.');
     $serial = $this->get_serial_from_file($file);
     // User selected to rescan a file.
     if (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         pb_backupbuddy::alert('Rescanning backup integrity for backup file `' . basename($file) . '`');
     }
     if (isset(pb_backupbuddy::$options['backups'][$serial]['integrity']) && count(pb_backupbuddy::$options['backups'][$serial]['integrity']) > 0 && pb_backupbuddy::_GET('reset_integrity') != $serial) {
         // Already have integrity data and NOT resetting this one.
         pb_backupbuddy::status('details', 'Integrity data for backup `' . $serial . '` is cached; not scanning again.');
         return true;
     } elseif (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         // Resetting this one.
         pb_backupbuddy::status('details', 'Resetting backup integrity stats for backup with serial `' . $serial . '`.');
     } else {
         // No integrity data; not resetting. Just keep going...
     }
     if (pb_backupbuddy::$options['integrity_check'] == '0') {
         // Integrity checking disabled.
         pb_backupbuddy::status('details', 'Integrity check disabled. Skipping scan.');
         $file_stats = @stat($file);
         if ($file_stats === false) {
             // stat failure.
             pb_backupbuddy::status('error', 'Error #4539774. Unable to get file details ( via stat() ) for file `' . $file . '`. The file may be corrupt or too large for the server.');
             $file_size = 0;
             $file_modified = 0;
         } else {
             // stat success.
             $file_size = $file_stats['size'];
             $file_modified = $file_stats['mtime'];
         }
         unset($file_stats);
         $integrity = array('status' => 'Unknown', 'status_details' => __('Integrity checking disabled based on settings. This file has not been verified.', 'it-l10n-backupbuddy'), 'scan_time' => 0, 'detected_type' => 'unknown', 'size' => $file_size, 'modified' => $file_modified, 'file' => basename($file), 'comment' => false);
         pb_backupbuddy::$options['backups'][$serial]['integrity'] = array_merge(pb_backupbuddy::settings('backups_integrity_defaults'), $integrity);
         pb_backupbuddy::save();
         return true;
     }
     //***** BEGIN CALCULATING STATUS DETAILS.
     // Status defaults.
     $status_details = array('found_dat' => false, 'found_sql' => false, 'found_wpconfig' => false, 'scan_log' => '');
     $backup_type = '';
     if (!isset(pb_backupbuddy::$classes['zipbuddy'])) {
         require_once pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php';
         pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddy(pb_backupbuddy::$options['backup_directory']);
     }
     pb_backupbuddy::status('details', 'Redirecting status logging temporarily.');
     $previous_status_serial = pb_backupbuddy::get_status_serial();
     // Store current status serial setting to reset back later.
     pb_backupbuddy::set_status_serial('zipbuddy_test');
     // Redirect logging output to a certain log file.
     // Look for comment.
     pb_backupbuddy::status('details', 'Verifying comment in zip archive.');
     $raw_comment = pb_backupbuddy::$classes['zipbuddy']->get_comment($file);
     $comment = pb_backupbuddy::$classes['core']->normalize_comment_data($raw_comment);
     $comment = $comment['note'];
     // Check for DAT file.
     pb_backupbuddy::status('details', 'Verifying DAT file in zip archive.');
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/backupbuddy_temp/' . $serial . '/backupbuddy_dat.php') === true) {
         // Post 2.0 full backup
         $status_details['found_dat'] = true;
         $backup_type = 'full';
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/temp_' . $serial . '/backupbuddy_dat.php') === true) {
         // Pre 2.0 full backup
         $status_details['found_dat'] = true;
         $backup_type = 'full';
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'backupbuddy_dat.php') === true) {
         // DB backup
         $status_details['found_dat'] = true;
         $backup_type = 'db';
     }
     // Check for DB SQL file.
     pb_backupbuddy::status('details', 'Verifying database SQL file in zip archive.');
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/backupbuddy_temp/' . $serial . '/db_1.sql') === true) {
         // post 2.0 full backup
         $status_details['found_sql'] = true;
         $backup_type = 'full';
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/temp_' . $serial . '/db.sql') === true) {
         // pre 2.0 full backup
         $status_details['found_sql'] = true;
         $backup_type = 'full';
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'db_1.sql') === true) {
         // db only backup 2.0+
         $status_details['found_sql'] = true;
         $backup_type = 'db';
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'db.sql') === true) {
         // db only backup pre-2.0
         $status_details['found_sql'] = true;
         $backup_type = 'db';
     }
     // Check for WordPress config file.
     pb_backupbuddy::status('details', 'Verifying WordPress wp-config.php configuration file in zip archive.');
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-config.php') === true) {
         $status_details['found_wpconfig'] = true;
         $backup_type = 'full';
//.........这里部分代码省略.........
开发者ID:jimlongo56,项目名称:bhouse,代码行数:101,代码来源:core.php

示例4: backup_integrity_check

 public static function backup_integrity_check($file, $fileoptions = '', $options = array(), $skipLogRedirect = false)
 {
     pb_backupbuddy::status('details', 'Started backup_integrity_check() function.');
     $serial = self::get_serial_from_file($file);
     // User selected to rescan a file.
     if (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         pb_backupbuddy::alert('Rescanning backup integrity for backup file `' . basename($file) . '`');
         pb_backupbuddy::flush();
     }
     $options = array_merge(array('skip_database_dump' => '0'), $options);
     $scan_notes = array();
     // Get backup fileoptions.
     if ($fileoptions != '') {
         $backup_options =& $fileoptions;
     } else {
         require_once pb_backupbuddy::plugin_path() . '/classes/fileoptions.php';
         $backup_options = new pb_backupbuddy_fileoptions(backupbuddy_core::getLogDirectory() . 'fileoptions/' . $serial . '.txt', $read_only = false, $ignore_lock = false, $create_file = true);
         // Will create file to hold integrity data if nothing exists.
         if (true !== ($result = $backup_options->is_ok())) {
             pb_backupbuddy::status('error', __('Fatal Error #9034 C. Unable to access fileoptions data.', 'it-l10n-backupbuddy') . ' Error on file `' . backupbuddy_core::getLogDirectory() . 'fileoptions/' . $serial . '.txt' . '`: ' . $result);
             pb_backupbuddy::status('haltScript', '');
             // Halt JS on page.
             return false;
         }
     }
     if (isset($backup_options->options['profile'])) {
         $options = $backup_options->options['profile'];
         $options = array_merge(pb_backupbuddy::settings('profile_defaults'), $options);
     }
     // Return if cached.
     if (isset($backup_options->options['integrity']) && count($backup_options->options['integrity']) > 0 && pb_backupbuddy::_GET('reset_integrity') != $serial) {
         // Already have integrity data and NOT resetting this one.
         pb_backupbuddy::status('details', 'Integrity data for backup `' . $serial . '` is cached; not scanning again.');
         return $backup_options->options['integrity'];
     } elseif (pb_backupbuddy::_GET('reset_integrity') == $serial) {
         // Resetting this one.
         pb_backupbuddy::status('details', 'Resetting backup integrity stats for backup with serial `' . $serial . '`.');
     } else {
         // No integrity data; not resetting. Just keep going...
     }
     // Integrity check disabled. Skip.
     if (pb_backupbuddy::$options['profiles'][0]['integrity_check'] == '0' && pb_backupbuddy::_GET('reset_integrity') == '' && isset($options['integrity_check']) && $options['integrity_check'] == '0') {
         // Integrity checking disabled. Allows run if manually rescanning on backups page.
         pb_backupbuddy::status('details', 'Integrity check disabled. Skipping scan.');
         $file_stats = @stat($file);
         if ($file_stats === false) {
             // stat failure.
             pb_backupbuddy::status('error', 'Error #4539774. Unable to get file details ( via stat() ) for file `' . $file . '`. The file may be corrupt or too large for the server.');
             $file_size = 0;
             $file_modified = 0;
         } else {
             // stat success.
             $file_size = $file_stats['size'];
             $file_modified = $file_stats['mtime'];
         }
         unset($file_stats);
         $integrity = array('status' => 'Unknown', 'tests' => array(), 'scan_time' => 0, 'detected_type' => 'unknown', 'size' => $file_size, 'modified' => $file_modified, 'file' => basename($file), 'comment' => false);
         $backup_options->options['integrity'] = array_merge(pb_backupbuddy::settings('backups_integrity_defaults'), $integrity);
         $backup_options->save();
         return $backup_options->options['integrity'];
     }
     //***** BEGIN CALCULATING STATUS DETAILS.
     $backup_type = '';
     if (!isset(pb_backupbuddy::$classes['zipbuddy'])) {
         require_once pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php';
         pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddy(backupbuddy_core::getBackupDirectory());
     }
     $previous_status_serial = pb_backupbuddy::get_status_serial();
     // Store current status serial setting to reset back later.
     if (true !== $skipLogRedirect) {
         pb_backupbuddy::status('details', 'Redirecting status logging temporarily.');
         pb_backupbuddy::set_status_serial('zipbuddy_test');
         // Redirect logging output to a certain log file.
     }
     // Look for comment.
     pb_backupbuddy::status('details', 'Verifying comment in zip archive.');
     $raw_comment = pb_backupbuddy::$classes['zipbuddy']->get_comment($file);
     $comment = backupbuddy_core::normalize_comment_data($raw_comment);
     $comment = $comment['note'];
     $tests = array();
     pb_backupbuddy::status('details', 'NOTE: It is normal to see several "File not found" messages in the next several log lines.');
     // Check for DAT file.
     $pass = false;
     pb_backupbuddy::status('details', 'Verifying DAT file in zip archive.');
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/backupbuddy_temp/' . $serial . '/backupbuddy_dat.php') === true) {
         // Post 2.0 full backup
         $backup_type = 'full';
         $pass = true;
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'wp-content/uploads/temp_' . $serial . '/backupbuddy_dat.php') === true) {
         // Pre 2.0 full backup
         $backup_type = 'full';
         $pass = true;
     }
     if (pb_backupbuddy::$classes['zipbuddy']->file_exists($file, 'backupbuddy_dat.php') === true) {
         // DB backup
         $backup_type = 'db';
         $pass = true;
     }
     $tests[] = array('test' => 'BackupBuddy data file', 'pass' => $pass);
//.........这里部分代码省略.........
开发者ID:adrianjonmiller,项目名称:animalhealth,代码行数:101,代码来源:core.php

示例5: run_periodic_process

 public static function run_periodic_process($preferredStep = '', $preferredStepArgs = array())
 {
     require_once pb_backupbuddy::plugin_path() . '/destinations/live/live.php';
     $previous_status_serial = pb_backupbuddy::get_status_serial();
     // Hold current serial.
     pb_backupbuddy::set_status_serial('live_periodic');
     // Redirect logging output to a certain log file.
     global $wp_version;
     $liveID = backupbuddy_live::getLiveID();
     $logging_disabled = isset(pb_backupbuddy::$options['remote_destinations'][$liveID]['disable_logging']) && '1' == pb_backupbuddy::$options['remote_destinations'][$liveID]['disable_logging'];
     if (!$logging_disabled) {
         pb_backupbuddy::status('details', '-----');
         pb_backupbuddy::status('details', 'Live periodic process starting with BackupBuddy v' . pb_backupbuddy::settings('version') . ' with WordPress v' . $wp_version . '.');
     }
     // Make sure we are not PAUSED.
     if ('1' == pb_backupbuddy::$options['remote_destinations'][$liveID]['pause_periodic']) {
         pb_backupbuddy::status('details', 'Aborting periodic process as it is currently PAUSED based on settings.');
         // Undo log redirect.
         pb_backupbuddy::set_status_serial($previous_status_serial);
         return false;
     }
     // Logging disabled.
     if ($logging_disabled) {
         pb_backupbuddy::set_status_serial($previous_status_serial);
     }
     require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
     require_once pb_backupbuddy::plugin_path() . '/classes/fileoptions.php';
     // Register a shutdown function to catch PHP errors and log them.
     register_shutdown_function('backupbuddy_live_periodic::shutdown_function');
     // Load state into self::$_state & fileoptions object into self::$_stateObj.
     if (false === self::_load_state()) {
         return false;
     }
     // No PHP runtime calculated yet. Try to see if test is finished.
     if (0 == pb_backupbuddy::$options['tested_php_runtime']) {
         backupbuddy_core::php_runtime_test_results();
     }
     // Update stats and save.
     if (0 === self::$_state['step']['start_time']) {
         self::$_state['step']['start_time'] = microtime(true);
     }
     self::$_state['step']['last_run_start'] = microtime(true);
     // Load destination settings.
     $destination_settings = self::get_destination_settings();
     // If wait_on_transfers was the last step running and time limit has passed then we can start from the beginning.
     if ('wait_on_transfers' == self::$_state['step']['function'] && self::$_state['stats']['wait_on_transfers_start'] > 0 && time() - self::$_state['stats']['wait_on_transfers_start'] > $destination_settings['max_wait_on_transfers_time'] * 60) {
         pb_backupbuddy::status('warning', 'Ran out of max time (`' . round((time() - self::$_state['stats']['wait_on_transfers_start']) / 60) . '` of `' . $destination_settings['max_wait_on_transfers_time'] . '` max mins) waiting for pending transfers to finish. Resetting back to beginning of periodic process.');
         self::$_state['step'] = self::$_stepDefaults;
         // Clear step state.
     }
     // Increment attempts if running the same function exactly as before. Set preferredStep args if we are indeed on this step.
     //sort( self::$_state['step']['args'] ); // Make sure order is same.
     //sort( $preferredStepArgs ); // Make sure order is same.
     if ('' == $preferredStep || self::$_state['step']['function'] == $preferredStep && self::$_state['step']['args'] == $preferredStepArgs) {
         // If preferredStep is blank OR ( preferredStep matches next step AND arguments are the same ).
         self::$_state['step']['attempts']++;
     }
     if ('' != $preferredStep) {
         self::_set_next_step($preferredStep, $preferredStepArgs);
     }
     // If restart transient is set then restart the Live process all the way back to daily_init. This is done when settings are saved so they will take effect immediately.
     if (false !== ($jump_step = get_transient('backupbuddy_live_jump'))) {
         pb_backupbuddy::status('details', 'Restart transient exists. Clearing.');
         delete_transient('backupbuddy_live_jump');
         $jump_step_name = $jump_step[0];
         $jump_step_args = array();
         if (isset($jump_step[1]) && is_array($jump_step[1])) {
             $jump_step_args = $jump_step[1];
         }
         self::_set_next_step($jump_step_name);
         pb_backupbuddy::status('details', 'Reset next step to `' . $jump_step_name . '` with args `' . print_r($jump_step_args, true) . '` due to backupbuddy_live_jump transient.');
     }
     // Check if a manual snapshot is requested.
     if (false !== get_transient('backupbuddy_live_snapshot')) {
         pb_backupbuddy::status('details', 'Manual Live Snapshot requested.');
         delete_transient('backupbuddy_live_snapshot');
         self::_request_manual_snapshot();
     }
     // Set first activity (creation of Live basically).
     if (0 == self::$_state['stats']['first_activity']) {
         self::$_state['stats']['first_activity'] = time();
     }
     // Save attempt.
     self::$_stateObj->save();
     // Run step function and process results.
     $schedule_next_step = false;
     $start_time = microtime(true);
     $run_function = self::$_state['step']['function'];
     pb_backupbuddy::status('details', 'Starting Live periodic function `' . $run_function . '`.');
     if (!is_callable('self::_step_' . $run_function)) {
         pb_backupbuddy::status('error', 'Error #439347494: Invalid step called: `' . $run_function . '` Unknown function: `self::_step_' . $run_function . '`.');
     }
     $function_response = call_user_func_array('self::_step_' . $run_function, self::$_state['step']['args']);
     // Run step function. Returns true on success, string error message on fatal failure, and array( 'status message', array( ARGS ) ) when chunking back to same step.
     self::$_state['step']['last_run_finish'] = microtime(true);
     self::$_state['stats']['last_activity'] = microtime(true);
     pb_backupbuddy::status('details', 'Ended Live periodic function `' . $run_function . '`.');
     // Process stepfunction results.
     if (is_array($function_response)) {
         // Chunking back to same step since we got an array. Index 0 = last_status, index 1 = args. Keeps same step function.
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:live_periodic.php


注:本文中的pb_backupbuddy::get_status_serial方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。