Plugin Directory

Changeset 2362596


Ignore:
Timestamp:
08/16/2020 10:31:20 PM (6 years ago)
Author:
Will Brownsberger
Message:

handle ALTERNATE_WP_CRON and eliminate verbose messages

Location:
wp-issues-crm
Files:
6 edited
11 copied

Legend:

Unmodified
Added
Removed
  • wp-issues-crm/tags/4.5.4.1/php/entity/class-wic-entity-email-cron.php

    r2147450 r2362596  
    142142        foreach ( $blog_ids as $blog_id ) {
    143143            switch_to_blog ( $blog_id );
    144             self::log_mail ( 'Starting sync run for ' . site_url(), true );
     144            self::log_mail ( 'Starting sync run for ' . site_url() );
    145145            WIC_Entity_Email_Account::route_sync();         
    146             self::log_mail ( 'Completed sync run for ' . site_url(), true );
     146            self::log_mail ( 'Completed sync run for ' . site_url() );
    147147            // check time out and do not continue to other users or start parse/deliver if over time on sync
    148148            if ( time() > $end_time ) {
     
    199199
    200200        // cleanup     
    201         self::log_mail ( '>>>>>Completed mail_call in alloted time.', true );
     201        self::log_mail ( '>>>>>Completed mail_call in alloted time.' );
    202202        unset ( $wp_issues_crm_activesync_connection_cache );
    203203        die;   
  • wp-issues-crm/tags/4.5.4.1/php/entity/class-wic-entity-email-inbox-synch.php

    r2298368 r2362596  
    329329               
    330330                if ( $early_deletes_for_high_folder_uid > 5 ) {
    331                     error_log ( "$early_deletes_for_high_folder_uid messages deleted from $inbox_table on high_folder_uid condition with high folder uid = $folder_max_uid and low imap uid = $imap_max_uid  -- this is a diagnostic trace and not necessarily an error.");             
     331                    WIC_Entity_Email_Cron::log_mail ( "$early_deletes_for_high_folder_uid messages deleted from $inbox_table on high_folder_uid condition with high folder uid = $folder_max_uid and low imap uid = $imap_max_uid  -- this is a diagnostic trace and not necessarily an error.");               
    332332                }
    333333            }
     
    388388                $extra_uid_count = $extra_uid_count - $zero_num_deletes;
    389389                if ( $zero_num_deletes > 5 ) {
    390                     error_log ( "$zero_num_deletes messages deleted from $inbox_table on num_msg = 0 condition -- this is a diagnostic trace and not necessarily an error.");               
     390                    WIC_Entity_Email_Cron::log_mail ( "$zero_num_deletes messages deleted from $inbox_table on num_msg = 0 condition -- this is a diagnostic trace and not necessarily an error.");             
    391391                }
    392392            } else {   
     
    720720        $gap_deleted_count = $wpdb->query ( $sql );
    721721        if ( $gap_deleted_count > 5 ) {
    722             error_log ( "$gap_deleted_count messages deleted from $inbox_table on gap condition with high $high and low $low on seq_no $seq_no -- this is a diagnostic trace and not necessarily an error.");               
     722            WIC_Entity_Email_Cron::log_mail ( "$gap_deleted_count messages deleted from $inbox_table on gap condition with high $high and low $low on seq_no $seq_no -- this is a diagnostic trace and not necessarily an error.");             
    723723        }   
    724724        return $gap_deleted_count;
  • wp-issues-crm/tags/4.5.4.1/readme.txt

    r2361312 r2362596  
    55Requires at least: 5
    66Tested up to: 5.5
    7 Stable tag: 4.5.4
     7Stable tag: 4.5.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.4.1 =
     111* Eliminate verbose mail and error log messages
     112* Load dictionary early in case of ALTERNATE_WP_CRON setting
    110113= 4.5.4
    111114* Change SQL engine to default (InnoDB) instead of MyISAM (note this change does not self implement on existing installations and requires MYSQL 5.6.4)
  • wp-issues-crm/tags/4.5.4.1/wp-issues-crm.php

    r2361312 r2362596  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.4
     6 * Version: 4.5.4.1
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
     
    9797    if ( isset ( $_GET['wp_issues_crm_run_cron_key'] ) ) {
    9898        if ( WP_ISSUES_CRM_RUN_CRON_KEY == $_GET['wp_issues_crm_run_cron_key'] ) {
    99             WIC_Entity_Email_Cron::log_mail ( '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WIC_Entity_Email_Cron::mail_call()+++++++++++++++++++++++++++++++++++++++++++++++++++', true );
     99            WIC_Entity_Email_Cron::log_mail ( '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WIC_Entity_Email_Cron::mail_call()+++++++++++++++++++++++++++++++++++++++++++++++++++' );
    100100            WIC_Entity_Email_Cron::mail_call();
    101101            die; // proceed no further
     
    148148register_activation_hook ( __FILE__, array ( 'WIC_Admin_Setup', 'wic_set_up_roles_and_capabilities' ) );
    149149
    150 
    151 // set global to reflect database collation level -- increased for post version 4 installations, but not automatically upgraded
    152 // global tested in admin functions ( send/upload ) and cron mail processing (wp or cron tab invoked)
    153 if ( is_admin() || wp_doing_cron() ) {
     150/*
     151* set global to reflect database collation level -- increased for post version 4 installations, but not automatically upgraded
     152* global dictionary used in all admin functions, but loaded later for them; need here for cron mail processing (wp or cron tab invoked)
     153* Added ALTERNATE_WP_CRON as an always  early load condition to handle alt cron routing even though may not actually be doing cron;
     154*   basically assuming that load will be worth it since if need alternate cron due to site sign-in mechanisms,
     155*       likely to be doing primarily administrative work on site and so likely to loading dictionary later anyway
     156*/
     157if ( is_admin() || wp_doing_cron() || ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) ) {
    154158    WIC_DB_Setup::check_high_plane_collation();
    155159    WIC_Admin_Navigation::dictionary_setup(); // need this for cron routing as well as admin
  • wp-issues-crm/trunk/php/entity/class-wic-entity-email-cron.php

    r2147450 r2362596  
    142142        foreach ( $blog_ids as $blog_id ) {
    143143            switch_to_blog ( $blog_id );
    144             self::log_mail ( 'Starting sync run for ' . site_url(), true );
     144            self::log_mail ( 'Starting sync run for ' . site_url() );
    145145            WIC_Entity_Email_Account::route_sync();         
    146             self::log_mail ( 'Completed sync run for ' . site_url(), true );
     146            self::log_mail ( 'Completed sync run for ' . site_url() );
    147147            // check time out and do not continue to other users or start parse/deliver if over time on sync
    148148            if ( time() > $end_time ) {
     
    199199
    200200        // cleanup     
    201         self::log_mail ( '>>>>>Completed mail_call in alloted time.', true );
     201        self::log_mail ( '>>>>>Completed mail_call in alloted time.' );
    202202        unset ( $wp_issues_crm_activesync_connection_cache );
    203203        die;   
  • wp-issues-crm/trunk/php/entity/class-wic-entity-email-inbox-synch.php

    r2298368 r2362596  
    329329               
    330330                if ( $early_deletes_for_high_folder_uid > 5 ) {
    331                     error_log ( "$early_deletes_for_high_folder_uid messages deleted from $inbox_table on high_folder_uid condition with high folder uid = $folder_max_uid and low imap uid = $imap_max_uid  -- this is a diagnostic trace and not necessarily an error.");             
     331                    WIC_Entity_Email_Cron::log_mail ( "$early_deletes_for_high_folder_uid messages deleted from $inbox_table on high_folder_uid condition with high folder uid = $folder_max_uid and low imap uid = $imap_max_uid  -- this is a diagnostic trace and not necessarily an error.");               
    332332                }
    333333            }
     
    388388                $extra_uid_count = $extra_uid_count - $zero_num_deletes;
    389389                if ( $zero_num_deletes > 5 ) {
    390                     error_log ( "$zero_num_deletes messages deleted from $inbox_table on num_msg = 0 condition -- this is a diagnostic trace and not necessarily an error.");               
     390                    WIC_Entity_Email_Cron::log_mail ( "$zero_num_deletes messages deleted from $inbox_table on num_msg = 0 condition -- this is a diagnostic trace and not necessarily an error.");             
    391391                }
    392392            } else {   
     
    720720        $gap_deleted_count = $wpdb->query ( $sql );
    721721        if ( $gap_deleted_count > 5 ) {
    722             error_log ( "$gap_deleted_count messages deleted from $inbox_table on gap condition with high $high and low $low on seq_no $seq_no -- this is a diagnostic trace and not necessarily an error.");               
     722            WIC_Entity_Email_Cron::log_mail ( "$gap_deleted_count messages deleted from $inbox_table on gap condition with high $high and low $low on seq_no $seq_no -- this is a diagnostic trace and not necessarily an error.");             
    723723        }   
    724724        return $gap_deleted_count;
  • wp-issues-crm/trunk/readme.txt

    r2361312 r2362596  
    55Requires at least: 5
    66Tested up to: 5.5
    7 Stable tag: 4.5.4
     7Stable tag: 4.5.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.4.1 =
     111* Eliminate verbose mail and error log messages
     112* Load dictionary early in case of ALTERNATE_WP_CRON setting
    110113= 4.5.4
    111114* Change SQL engine to default (InnoDB) instead of MyISAM (note this change does not self implement on existing installations and requires MYSQL 5.6.4)
  • wp-issues-crm/trunk/wp-issues-crm.php

    r2361312 r2362596  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.4
     6 * Version: 4.5.4.1
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
     
    9797    if ( isset ( $_GET['wp_issues_crm_run_cron_key'] ) ) {
    9898        if ( WP_ISSUES_CRM_RUN_CRON_KEY == $_GET['wp_issues_crm_run_cron_key'] ) {
    99             WIC_Entity_Email_Cron::log_mail ( '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WIC_Entity_Email_Cron::mail_call()+++++++++++++++++++++++++++++++++++++++++++++++++++', true );
     99            WIC_Entity_Email_Cron::log_mail ( '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WIC_Entity_Email_Cron::mail_call()+++++++++++++++++++++++++++++++++++++++++++++++++++' );
    100100            WIC_Entity_Email_Cron::mail_call();
    101101            die; // proceed no further
     
    148148register_activation_hook ( __FILE__, array ( 'WIC_Admin_Setup', 'wic_set_up_roles_and_capabilities' ) );
    149149
    150 
    151 // set global to reflect database collation level -- increased for post version 4 installations, but not automatically upgraded
    152 // global tested in admin functions ( send/upload ) and cron mail processing (wp or cron tab invoked)
    153 if ( is_admin() || wp_doing_cron() ) {
     150/*
     151* set global to reflect database collation level -- increased for post version 4 installations, but not automatically upgraded
     152* global dictionary used in all admin functions, but loaded later for them; need here for cron mail processing (wp or cron tab invoked)
     153* Added ALTERNATE_WP_CRON as an always  early load condition to handle alt cron routing even though may not actually be doing cron;
     154*   basically assuming that load will be worth it since if need alternate cron due to site sign-in mechanisms,
     155*       likely to be doing primarily administrative work on site and so likely to loading dictionary later anyway
     156*/
     157if ( is_admin() || wp_doing_cron() || ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) ) {
    154158    WIC_DB_Setup::check_high_plane_collation();
    155159    WIC_Admin_Navigation::dictionary_setup(); // need this for cron routing as well as admin
Note: See TracChangeset for help on using the changeset viewer.