Plugin Directory

Changeset 3427948


Ignore:
Timestamp:
12/26/2025 07:18:30 PM (3 weeks ago)
Author:
stefanolodola
Message:

added tag 2.1.13
replaced trunk

Location:
nuclear-engagement
Files:
441 added
3 edited

Legend:

Unmodified
Added
Removed
  • nuclear-engagement/trunk/README.txt

    r3405245 r3427948  
    99Tested up to: 6.9
    1010Requires PHP: 7.4
    11 Stable tag: 2.1.12
     11Stable tag: 2.1.13
    1212License: GPL-2.0+
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    282282
    283283== Changelog ==
     284
     285= 2.1.13 – 2025-12-26 =
     286* Fixed: Excessive logging of timeout checks on every page load.
     287* Improved: Timeout checks now handled exclusively by cron job (every 5 minutes) instead of on every request.
     288* Removed: Redundant timeout check cron job (consolidated into single cron).
    284289
    285290= 2.1.12 – 2025-11-28 =
  • nuclear-engagement/trunk/inc/Core/PluginBootstrap.php

    r3339449 r3427948  
    190190            delete_option( 'nuclen_bootstrap_error' );
    191191
    192             // Schedule more frequent timeout checks (every 5 minutes instead of hourly)
    193             // This helps catch stuck tasks more quickly
    194             if ( ! wp_next_scheduled( 'nuclen_frequent_timeout_check' ) ) {
    195                 wp_schedule_event( time() + 60, 'nuclen_five_minutes', 'nuclen_frequent_timeout_check' );
    196             }
     192            // Clean up redundant cron job from previous versions
     193            // Timeout checks are now handled by nuclen_check_task_timeouts in TaskTimeoutHandler
     194            wp_clear_scheduled_hook( 'nuclen_frequent_timeout_check' );
    197195        } catch ( \Throwable $e ) {
    198196            // Log but don't block activation
     
    205203        wp_clear_scheduled_hook( 'nuclen_theme_migration' );
    206204        wp_clear_scheduled_hook( 'nuclen_cleanup_logs' );
    207         wp_clear_scheduled_hook( 'nuclen_frequent_timeout_check' );
    208205        wp_clear_scheduled_hook( 'nuclen_check_task_timeouts' );
    209206        wp_clear_scheduled_hook( 'nuclear_engagement_daily_generation' );
     
    344341        add_filter( 'cron_schedules', array( $this, 'registerCronSchedules' ) );
    345342
    346         // Register frequent timeout check hook
    347         add_action( 'nuclen_frequent_timeout_check', array( $this, 'runFrequentTimeoutCheck' ) );
    348343        add_action( 'nuclen_cleanup_logs', array( $this, 'cleanupLogs' ) );
    349344    }
     
    564559            self::$initialized_services['task_timeout'] = true;
    565560
    566             // Run an immediate timeout check on initialization, but only once per request
    567             // and not during AJAX or cron requests to avoid excessive checks
    568             static $initial_check_done = false;
    569             if ( ! $initial_check_done && ! wp_doing_ajax() && ! wp_doing_cron() ) {
    570                 $initial_check_done = true;
    571                 try {
    572                     LoggingService::log( '[PluginBootstrap] Running immediate timeout check on initialization' );
    573                     $timeout_handler->check_timeouts();
    574                 } catch ( \Throwable $e ) {
    575                     LoggingService::log(
    576                         sprintf( '[PluginBootstrap] Error running initial timeout check: %s', $e->getMessage() ),
    577                         'error'
    578                     );
    579                 }
    580             }
     561            // Timeout checks are handled by the cron job (nuclen_check_task_timeouts)
     562            // running every 5 minutes. No immediate check is needed - this avoids
     563            // database overhead on every page load while still ensuring stuck tasks
     564            // are detected within 5 minutes (well within the 30-minute timeout thresholds).
    581565        }
    582566    }
     
    974958        return $schedules;
    975959    }
    976 
    977     /**
    978      * Run frequent timeout check.
    979      */
    980     public function runFrequentTimeoutCheck(): void {
    981         try {
    982             $container = ServiceContainer::getInstance();
    983             if ( $container->has( 'task_timeout_handler' ) ) {
    984                 $timeout_handler = $container->get( 'task_timeout_handler' );
    985                 $timeout_handler->check_timeouts();
    986             }
    987         } catch ( \Throwable $e ) {
    988             LoggingService::log(
    989                 sprintf( '[PluginBootstrap] Error running frequent timeout check: %s', $e->getMessage() ),
    990                 'error'
    991             );
    992         }
    993     }
    994960}
  • nuclear-engagement/trunk/nuclear-engagement.php

    r3405245 r3427948  
    44 * Plugin URI:        https://www.nuclearengagement.com
    55 * Description:       Bulk generate engaging content for your blog posts with AI in one click.
    6  * Version:           2.1.12
     6 * Version:           2.1.13
    77 * Author:            Stefano Lodola
    88 * Requires at least: 6.1
Note: See TracChangeset for help on using the changeset viewer.