Plugin Directory

Changeset 3062622


Ignore:
Timestamp:
04/02/2024 11:40:20 AM (2 years ago)
Author:
electronart
Message:

3513 fix error checking load

Location:
site-search-one/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • site-search-one/trunk/README.txt

    r3031599 r3062622  
    7373
    7474
    75 
    7675== Changelog ==
    7776
    78 = 2.0.0.3512 (2024-02-05) =
    79 * Enhancement: Improved live indexing display
    80 * Enhancement: Added server load management during sync, to prevent CPU issues during sync.
     77= 2.0.0.3513 (2024-04-02) =
     78
     79* Fix: Error in some environments related to load management caused plugin to be unable to sync.
  • site-search-one/trunk/admin/class-sc1-index-manager.php

    r2993423 r3062622  
    300300        // region 1. Identify which indexes have no/out of date xfirstword search cache.
    301301        global $wpdb;
    302         $results    = wp_cache_get( 'site-search-one-expired-xfirstword-caches' );
     302        $results    = wp_cache_get( 'site-search-one-expired-xfirstword-caches', '', false, $found );
    303303        $table_name = $wpdb->prefix . 'ss1_sc1_indexes';
    304         if ( false === $results ) {
     304        if ( false === $results || false === $found ) {
    305305            $table_name2 = $wpdb->prefix . 'ss1_search_pages';
    306306            $sql         = 'SELECT sc1_ix_uuid, sc1_ix_id, post_id FROM '
  • site-search-one/trunk/changelog.txt

    r3031599 r3062622  
    11== Changelog ==
     2
     3= 2.0.0.3512 (2024-02-05) =
     4* Enhancement: Improved live indexing display
     5* Enhancement: Added server load management during sync, to prevent CPU issues during sync.
    26
    37= 2.0.0.3489 (2023-11-09) =
  • site-search-one/trunk/site-search-one.php

    r3031599 r3062622  
    1616 * Plugin URI:        https://sitesearchone.com
    1717 * Description:       WordPress Site Search Powered by dtSearch
    18  * Version:           2.0.0.3512
     18 * Version:           2.0.0.3513
    1919 * Author:            ElectronArt Design Ltd
    2020 * Author URI:        https://profiles.wordpress.org/electronart/
     
    4242 * Plugin Build Number
    4343 */
    44 define( 'SITE_SEARCH_ONE_BUILD', '3512' );
     44define( 'SITE_SEARCH_ONE_BUILD', '3513' );
    4545
    4646/**
     
    739739    }
    740740
    741     $sys_getloadavg    = sys_getloadavg();
    742     $sys_getloadavg[0] = $sys_getloadavg[0] / $cpu_count;
    743     $sys_getloadavg[1] = $sys_getloadavg[1] / $cpu_count;
    744     $sys_getloadavg[2] = $sys_getloadavg[2] / $cpu_count;
    745 
    746     return $sys_getloadavg;
     741    if (function_exists('sys_getloadavg')) {
     742        $sys_getloadavg    = sys_getloadavg();
     743        $sys_getloadavg[0] = $sys_getloadavg[0] / $cpu_count;
     744        $sys_getloadavg[1] = $sys_getloadavg[1] / $cpu_count;
     745        $sys_getloadavg[2] = $sys_getloadavg[2] / $cpu_count;
     746
     747        return $sys_getloadavg;
     748    } else {
     749        usleep(50); // Fall back to just a very small sleep regardless of processor usage on unsupported systems.
     750        return false;
     751    }
     752
    747753}
    748754
Note: See TracChangeset for help on using the changeset viewer.