Plugin Directory

Changeset 3247455


Ignore:
Timestamp:
02/26/2025 11:38:59 PM (2 weeks ago)
Author:
boldgrid
Message:

Release 1.16.10, see readme.txt for the changelog.

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  
    260260     *
    261261     * @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.
    265269     *
    266270     * For example, if a job is only supposed to take 1 minute, and it's been running for 3 hours, it's
     
    270274        $made_changes = false;
    271275
    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                }
    287308            }
    288309        }
  • boldgrid-backup/tags/1.16.10/boldgrid-backup.php

    r3246688 r3247455  
    1717 *          Plugin URI: https://www.boldgrid.com/boldgrid-backup/
    1818 *          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.9
     19 *          Version: 1.16.10
    2020 *          Author: BoldGrid
    2121 *          Author URI: https://www.boldgrid.com/
  • boldgrid-backup/tags/1.16.10/readme.txt

    r3246688 r3247455  
    55Tested up to: 6.7
    66Requires PHP: 5.4
    7 Stable tag: 1.16.9
     7Stable tag: 1.16.10
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    133133== Changelog ==
    134134
     135= 1.16.10 =
     136Release Date: Feb 26, 2025
     137* Bug Fix: Prevent old backlogged jobs from running due to a previous CRON bug.
     138
    135139= 1.16.9 =
    136140Release Date: Feb 25, 2025
  • boldgrid-backup/tags/1.16.10/vendor/autoload.php

    r3246655 r3247455  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitb172d40be3a9b365c2d1a0f25f3e8f1b::getLoader();
     7return ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713::getLoader();
  • boldgrid-backup/tags/1.16.10/vendor/composer/autoload_real.php

    r3246655 r3247455  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitb172d40be3a9b365c2d1a0f25f3e8f1b
     5class ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitb172d40be3a9b365c2d1a0f25f3e8f1b', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    27         spl_autoload_unregister(array('ComposerAutoloaderInitb172d40be3a9b365c2d1a0f25f3e8f1b', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit78d8e655d3810d3d27ad6bf9ac094713', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require_once __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5252
    5353        if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b::$files;
     54            $includeFiles = Composer\Autoload\ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$files;
    5555        } else {
    5656            $includeFiles = require __DIR__ . '/autoload_files.php';
    5757        }
    5858        foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequireb172d40be3a9b365c2d1a0f25f3e8f1b($fileIdentifier, $file);
     59            composerRequire78d8e655d3810d3d27ad6bf9ac094713($fileIdentifier, $file);
    6060        }
    6161
     
    6464}
    6565
    66 function composerRequireb172d40be3a9b365c2d1a0f25f3e8f1b($fileIdentifier, $file)
     66function composerRequire78d8e655d3810d3d27ad6bf9ac094713($fileIdentifier, $file)
    6767{
    6868    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • boldgrid-backup/tags/1.16.10/vendor/composer/autoload_static.php

    r3246655 r3247455  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b
     7class ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713
    88{
    99    public static $files = array (
     
    420420    {
    421421        return \Closure::bind(function () use ($loader) {
    422             $loader->prefixLengthsPsr4 = ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b::$prefixLengthsPsr4;
    423             $loader->prefixDirsPsr4 = ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b::$prefixDirsPsr4;
    424             $loader->classMap = ComposerStaticInitb172d40be3a9b365c2d1a0f25f3e8f1b::$classMap;
     422            $loader->prefixLengthsPsr4 = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$prefixLengthsPsr4;
     423            $loader->prefixDirsPsr4 = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$prefixDirsPsr4;
     424            $loader->classMap = ComposerStaticInit78d8e655d3810d3d27ad6bf9ac094713::$classMap;
    425425
    426426        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.