本文整理汇总了PHP中backupbuddy_core::trim_remote_send_stats方法的典型用法代码示例。如果您正苦于以下问题:PHP backupbuddy_core::trim_remote_send_stats方法的具体用法?PHP backupbuddy_core::trim_remote_send_stats怎么用?PHP backupbuddy_core::trim_remote_send_stats使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::trim_remote_send_stats方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
// Cleanup any temporary local destinations.
pb_backupbuddy::status('details', 'Cleaning up any temporary local destinations.');
foreach (pb_backupbuddy::$options['remote_destinations'] as $destination_id => $destination) {
if ($destination['type'] == 'local' && (isset($destination['temporary']) && $destination['temporary'] === true)) {
// If local and temporary.
if (time() - $destination['created'] > $backup_age_limit) {
// Older than 12 hours; clear out!
pb_backupbuddy::status('details', 'Cleaned up stale local destination `' . $destination_id . '`.');
unset(pb_backupbuddy::$options['remote_destinations'][$destination_id]);
pb_backupbuddy::save();
}
}
}
// Cleanup excess remote sending stats.
pb_backupbuddy::status('details', 'Cleaning up remote send stats.');
backupbuddy_core::trim_remote_send_stats();
// Verify directory existance and anti-directory browsing is in place everywhere.
backupbuddy_core::verify_directories($skipTempGeneration = true);
require_once pb_backupbuddy::plugin_path() . '/classes/fileoptions.php';
// Mark any backups noted as in progress to timed out if taking too long. Send error email is scheduled and failed or timed out.
// Also, Purge fileoptions files without matching backup file in existance that are older than 30 days.
pb_backupbuddy::status('details', 'Cleaning up old backup fileoptions option files.');
$fileoptions_directory = backupbuddy_core::getLogDirectory() . 'fileoptions/';
$files = glob($fileoptions_directory . '*.txt');
if (!is_array($files)) {
$files = array();
}
foreach ($files as $file) {
pb_backupbuddy::status('details', 'Fileoptions instance #43.');
$backup_options = new pb_backupbuddy_fileoptions($file, $read_only = false);
if (true !== ($result = $backup_options->is_ok())) {
示例2: foreach
// Cleanup any temporary local destinations.
pb_backupbuddy::status('details', 'Cleaning up any temporary local destinations.');
foreach (pb_backupbuddy::$options['remote_destinations'] as $destination_id => $destination) {
if ($destination['type'] == 'local' && (isset($destination['temporary']) && $destination['temporary'] === true)) {
// If local and temporary.
if (time() - $destination['created'] > $backup_age_limit) {
// Older than 12 hours; clear out!
pb_backupbuddy::status('details', 'Cleaned up stale local destination `' . $destination_id . '`.');
unset(pb_backupbuddy::$options['remote_destinations'][$destination_id]);
pb_backupbuddy::save();
}
}
}
// Cleanup excess remote sending stats.
pb_backupbuddy::status('details', 'Cleaning up remote send stats.');
backupbuddy_core::trim_remote_send_stats($backup_age_limit);
// Verify directory existance and anti-directory browsing is in place everywhere.
backupbuddy_core::verify_directories($skipTempGeneration = true);
require_once pb_backupbuddy::plugin_path() . '/classes/fileoptions.php';
// Mark any backups noted as in progress to timed out if taking too long. Send error email is scheduled and failed or timed out.
// Also, Purge fileoptions files without matching backup file in existance that are older than 30 days.
pb_backupbuddy::status('details', 'Cleaning up old backup fileoptions option files.');
$fileoptions_directory = backupbuddy_core::getLogDirectory() . 'fileoptions/';
$files = glob($fileoptions_directory . '*.txt');
if (!is_array($files)) {
$files = array();
}
foreach ($files as $file) {
pb_backupbuddy::status('details', 'Fileoptions instance #43.');
$backup_options = new pb_backupbuddy_fileoptions($file, $read_only = true);
if (true !== ($result = $backup_options->is_ok())) {