Changeset 3247455
- Timestamp:
- 02/26/2025 11:38:59 PM (2 weeks ago)
- Location:
- boldgrid-backup/tags/1.16.10
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
boldgrid-backup/tags/1.16.10/admin/class-boldgrid-backup-admin-jobs.php
r3246655 r3247455 260 260 * 261 261 * @since 1.15.5 262 * 263 * A stalled job is a job who's status has been set to "running", however it's been running longer 264 * than expected. 262 * 263 * A stalled job can be a job that has been pending for over a week. This is usually due to 264 * a CRON bug that has since been resolved in 1.16.9. If the job is older than a week, it will 265 * be removed. 266 * 267 * A stalled job can also be a job who's status has been set to "running" 268 * however it's been running longer than expected. 265 269 * 266 270 * For example, if a job is only supposed to take 1 minute, and it's been running for 3 hours, it's … … 270 274 $made_changes = false; 271 275 272 foreach ( $this->jobs as &$job ) { 273 if ( 'running' !== $job['status'] ) { 274 continue; 275 } 276 277 // Determine whether or not this job is stalled. 278 $time_limit = HOUR_IN_SECONDS; 279 $duration = time() - $job['start_time']; 280 $is_stalled = $duration > $time_limit; 281 282 if ( $is_stalled ) { 283 $job['end_time'] = time(); 284 $job['status'] = 'fail'; 285 286 $made_changes = true; 276 foreach ( $this->jobs as $key => &$job ) { 277 // Maybe delete old job if it's older than one week. 278 if ( preg_match('/-(\d{8})-\d{6}\.zip$/', $job['filepath'], $matches ) ) { 279 $date_str = $matches[1]; 280 281 // Create a DateTime object from the date string (format: YYYYMMDD) 282 $file_date = DateTime::createFromFormat( 'Ymd', $date_str ); 283 284 // Get the date for one week ago from now 285 $one_week_ago = new DateTime('-1 week'); 286 287 // Compare dates 288 if ( $file_date < $one_week_ago ) { 289 unset( $this->jobs[ $key ] ); 290 $made_changes = true; 291 continue; 292 } 293 } 294 295 // Maybe update job if it is running, and has stalled. 296 if ( 'running' === $job['status'] ) { 297 // Determine whether or not this job is stalled. 298 $time_limit = HOUR_IN_SECONDS; 299 $duration = time() - $job['start_time']; 300 $is_stalled = $duration > $time_limit; 301 302 if ( $is_stalled ) { 303 $job['end_time'] = time(); 304 $job['status'] = 'fail'; 305 306 $made_changes = true; 307 } 287 308 } 288 309 } -
boldgrid-backup/tags/1.16.10/boldgrid-backup.php
r3246688 r3247455 17 17 * Plugin URI: https://www.boldgrid.com/boldgrid-backup/ 18 18 * Description: Automated backups, remote backup to Amazon S3 and Google Drive, stop website crashes before they happen and more. Total Upkeep is the backup solution you need. 19 * Version: 1.16. 919 * Version: 1.16.10 20 20 * Author: BoldGrid 21 21 * Author URI: https://www.boldgrid.com/ -
boldgrid-backup/tags/1.16.10/readme.txt
r3246688 r3247455 5 5 Tested up to: 6.7 6 6 Requires PHP: 5.4 7 Stable tag: 1.16. 97 Stable tag: 1.16.10 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 133 133 == Changelog == 134 134 135 = 1.16.10 = 136 Release Date: Feb 26, 2025 137 * Bug Fix: Prevent old backlogged jobs from running due to a previous CRON bug. 138 135 139 = 1.16.9 = 136 140 Release Date: Feb 25, 2025 -
boldgrid-backup/tags/1.16.10/vendor/autoload.php
r3246655 r3247455 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit b172d40be3a9b365c2d1a0f25f3e8f1b::getLoader();7 return ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713::getLoader(); -
boldgrid-backup/tags/1.16.10/vendor/composer/autoload_real.php
r3246655 r3247455 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit b172d40be3a9b365c2d1a0f25f3e8f1b5 class ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit b172d40be3a9b365c2d1a0f25f3e8f1b', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 27 spl_autoload_unregister(array('ComposerAutoloaderInit b172d40be3a9b365c2d1a0f25f3e8f1b', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require_once __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::getInitializer($loader)); 34 34 } else { 35 35 $map = require __DIR__ . '/autoload_namespaces.php'; … … 52 52 53 53 if ($useStaticLoader) { 54 $includeFiles = Composer\Autoload\ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b::$files;54 $includeFiles = Composer\Autoload\ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$files; 55 55 } else { 56 56 $includeFiles = require __DIR__ . '/autoload_files.php'; 57 57 } 58 58 foreach ($includeFiles as $fileIdentifier => $file) { 59 composerRequire b172d40be3a9b365c2d1a0f25f3e8f1b($fileIdentifier, $file);59 composerRequire78d8e655d3810d3d27ad6bf9ac094713($fileIdentifier, $file); 60 60 } 61 61 … … 64 64 } 65 65 66 function composerRequire b172d40be3a9b365c2d1a0f25f3e8f1b($fileIdentifier, $file)66 function composerRequire78d8e655d3810d3d27ad6bf9ac094713($fileIdentifier, $file) 67 67 { 68 68 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
boldgrid-backup/tags/1.16.10/vendor/composer/autoload_static.php
r3246655 r3247455 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b7 class ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713 8 8 { 9 9 public static $files = array ( … … 420 420 { 421 421 return \Closure::bind(function () use ($loader) { 422 $loader->prefixLengthsPsr4 = ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b::$prefixLengthsPsr4;423 $loader->prefixDirsPsr4 = ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b::$prefixDirsPsr4;424 $loader->classMap = ComposerStaticInit b172d40be3a9b365c2d1a0f25f3e8f1b::$classMap;422 $loader->prefixLengthsPsr4 = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$prefixLengthsPsr4; 423 $loader->prefixDirsPsr4 = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$prefixDirsPsr4; 424 $loader->classMap = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$classMap; 425 425 426 426 }, null, ClassLoader::class);
Note: See TracChangeset
for help on using the changeset viewer.