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


PHP backupbuddy_core::cleanup_temp_tables方法代码示例

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


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

示例1: array

    if (isset($destination['max_chunk_size']) && $destination['max_chunk_size'] == '0') {
        continue;
    }
    pb_backupbuddy::status('details', 'Found S3 Multipart Chunking Destinations to cleanup.');
    require_once pb_backupbuddy::plugin_path() . '/destinations/bootstrap.php';
    $cleanup_result = pb_backupbuddy_destinations::multipart_cleanup($destination);
    /*
    if ( true === $cleanup_result ) {
    	pb_backupbuddy::status( 'details', 'S3 Multipart Chunking Cleanup Success.' );
    } else {
    	pb_backupbuddy::status( 'error', 'S3 Multipart Chunking Cleanup FAILURE. Manually cleanup stalled multipart send via S3 or try again later.' );
    }
    */
}
// Clean up any temp rollback or deployment database tables.
backupbuddy_core::cleanup_temp_tables();
// Cleanup any cron schedules pointing to non-existing schedules.
$cron = get_option('cron');
// Loop through each cron time to create $crons array for displaying later.
$crons = array();
foreach ((array) $cron as $time => $cron_item) {
    if (is_numeric($time)) {
        // Loop through each schedule for this time
        foreach ((array) $cron_item as $hook_name => $event) {
            foreach ((array) $event as $item_name => $item) {
                if ('pb_backupbuddy-cron_scheduled_backup' == $hook_name) {
                    // scheduled backup
                    if (!empty($item['args'])) {
                        if (!isset(pb_backupbuddy::$options['schedules'][$item['args'][0]])) {
                            // BB schedule does not exist so delete this cron item.
                            if (FALSE === backupbuddy_core::unschedule_event($time, $hook_name, $item['args'])) {
开发者ID:Offirmo,项目名称:base-wordpress,代码行数:31,代码来源:_periodicCleanup.php

示例2: die

<?php

backupbuddy_core::verifyAjaxAccess();
// Note: importbuddy, backup files, etc should have already been cleaned up by importbuddy itself at this point.
$serial = pb_backupbuddy::_POST('serial');
$direction = pb_backupbuddy::_POST('direction');
pb_backupbuddy::load();
if ('pull' == $direction) {
    // Local so clean up here.
    backupbuddy_core::cleanup_temp_tables($serial);
    die('1');
} elseif ('push' == $direction) {
    // Remote so call API to clean up.
    require_once pb_backupbuddy::plugin_path() . '/classes/remote_api.php';
    $destinationID = pb_backupbuddy::_POST('destinationID');
    if (!isset(pb_backupbuddy::$options['remote_destinations'][$destinationID])) {
        die('Error #8383983: Invalid destination ID `' . htmlentities($destinationID) . '`.');
    }
    $destinationArray = pb_backupbuddy::$options['remote_destinations'][$destinationID];
    if ('site' != $destinationArray['type']) {
        die('Error #8378332: Destination with ID `' . htmlentities($destinationID) . '` not of "site" type.');
    }
    $apiKey = $destinationArray['api_key'];
    $apiSettings = backupbuddy_remote_api::key_to_array($apiKey);
    if (false === ($response = backupbuddy_remote_api::remoteCall($apiSettings, 'confirmDeployment', array('serial' => $serial), 10, null, null, null, null, null, null, null, $returnRaw = true))) {
        $message = 'Error #2378378324. Unable to confirm remote deployment with serial `' . $serial . '` via remote API.';
        pb_backupbuddy::status('error', $message);
        die($message);
    } else {
        if (false === ($response = json_decode($response, true))) {
            $message = 'Error #239872373. Unable to decode remote deployment response with serial `' . $serial . '` via remote API. Remote server response: `' . print_r($response) . '`.';
开发者ID:shelbyneilsmith,项目名称:wptools,代码行数:31,代码来源:deploy_confirm.php

示例3: _verb_confirmDeployment

 private static function _verb_confirmDeployment()
 {
     $serial = pb_backupbuddy::_POST('serial');
     backupbuddy_core::cleanup_temp_tables($serial);
     die(json_encode(array('success' => true)));
 }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:6,代码来源:remote_api.php


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