Support » Plugin: Javelin Email Marketing » Autoresponder don't send newsletter

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    could you find a solution?

    I have the same Problem here, Hopefully Raj would give us some input on that.

    It seams we are dealing with this part of the code

    /*
     * This is the function that performs the autoresponder subscription processing
     */
    
    class WPRBackgroundProcessor {
    
        public static function autoresponder_process_subscriber($subscriber_id) {
    
            $getAutoresponderSubscriptionQuery = sprintf("SELECT * FROM {$wpdb->prefix}wpr_followup_subscriptions subscription, {$wpdb->prefix}wpr_subscribers subscribers WHERE
                                                                    subscription.sid=%d AND
                                                                    subscribers.id=subscription.sid AND
                                                                    subscribers.active=1 AND subscribers.confirmed=1;", $subscriber_id);
    
            $subscriptionResults = $wpdb->get_results($getAutoresponderSubscriptionQuery);
    
            if (0 == count ($subscriptionResults)) {
                return;
            }
    
        }
    
        public static function process_autoresponders() {
    
            $processor = AutoresponderProcessor::getProcessor();
            set_time_limit(WPR_MAX_AUTORESPONDER_PROCESS_EXECUTION_TIME);
    
            $timeOfStart = time();
            $currentTime = new DateTime(sprintf("@%d", $timeOfStart));
    
            $timeWhenAutoresponderProcessLastDidAHeartBeat = get_option("_wpr_autoresponder_process_status");
            if (self::whetherAnotherInstanceIsAlreadyRunning($timeOfStart, $timeWhenAutoresponderProcessLastDidAHeartBeat)) {
                return;
            }
    
            //set the time of ping for the autoresponder process status variable
            update_option("_wpr_autoresponder_process_status",$timeOfStart);
    
            //set the start time of the autoresponder process
            do_action("_wpr_autoresponder_process_start", $currentTime);
    
            //run the autoresponder processor
    
            $processor->run_for_time($currentTime);
    
            //call the hooks that need notification for the
            do_action('_wpr_autoresponder_process_end', $currentTime);
            update_option("_wpr_autoresponder_process_status","stopped");
    
        }
    
        public static function whetherAnotherInstanceIsAlreadyRunning($timeOfStart, $timeWhenAutoresponderProcessLastDidAHeartBeat)
        {
            $timeMaximumExecutionTimeAgo = $timeOfStart - WPR_MAX_AUTORESPONDER_PROCESS_EXECUTION_TIME;
            if (!empty($timeWhenAutoresponderProcessLastDidAHeartBeat) && $timeWhenAutoresponderProcessLastDidAHeartBeat != "stopped") {
                $timeWhenAutoresponderProcessLastDidAHeartBeat = intval($timeWhenAutoresponderProcessLastDidAHeartBeat);
                if ($timeWhenAutoresponderProcessLastDidAHeartBeat != 0 && (self::whetherLastAutoresponderProcessHeartBeatValidityExpired($timeWhenAutoresponderProcessLastDidAHeartBeat, $timeMaximumExecutionTimeAgo))) {
                    return true;
                }
            }
    
            return false;
        }
    
        private static function whetherLastAutoresponderProcessHeartBeatValidityExpired($timeWhenAutoresponderProcessLastDidAHeartBeat, $timeMaximumExecutionTimeAgo)
        {
            return !($timeWhenAutoresponderProcessLastDidAHeartBeat < $timeMaximumExecutionTimeAgo);
        }
    
    }

    Anyone got a Idea how to fix it 🙂

    Plugin Author nodesman

    (@nodesman)

    If you continue to face this problem, please email me here: raj@nodesman.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Autoresponder don't send newsletter’ is closed to new replies.