Disabled logging when the scheduler runs. Adjusted the number of conversations processed by the schedulers at a time
This commit is contained in:
parent
2c104022df
commit
dd22cf8777
2 changed files with 5 additions and 5 deletions
|
|
@ -14,13 +14,13 @@ class RL_MailWarmer_Conversation_Handler {
|
|||
$conversation_table = $wpdb->prefix . 'rl_mailwarmer_conversations';
|
||||
// $current_time = current_time('mysql');
|
||||
$start_time = date('Y-m-d H:i:s', strtotime('-96 hours'));
|
||||
$end_time = date('Y-m-d H:i:s', strtotime('+12 hours'));
|
||||
$end_time = date('Y-m-d H:i:s', strtotime('+2 hours'));
|
||||
// $end_time = date('Y-m-d H:i:s', strtotime('now'));
|
||||
|
||||
// Fetch up to 50 conversations starting within the next 24 hours
|
||||
$conversations = $wpdb->get_results(
|
||||
$wpdb->prepare(
|
||||
"SELECT * FROM $conversation_table WHERE status = %s AND first_message_timestamp BETWEEN %s AND %s ORDER BY first_message_timestamp ASC LIMIT 50",
|
||||
"SELECT * FROM $conversation_table WHERE status = %s AND first_message_timestamp BETWEEN %s AND %s ORDER BY first_message_timestamp ASC LIMIT 5",
|
||||
'new',
|
||||
$start_time,
|
||||
$end_time
|
||||
|
|
|
|||
|
|
@ -80,15 +80,15 @@ class RL_MailWarmer_Scheduler {
|
|||
* Process pending messages by delegating to the Message Handler.
|
||||
*/
|
||||
public static function cron_process_pending_messages() {
|
||||
action_log("====================== Running Cron to process messages ========================");
|
||||
// RL_MailWarmer_Message_Handler::process_pending_messages();
|
||||
// action_log("====================== Running Cron to process messages ========================");
|
||||
RL_MailWarmer_Message_Handler::process_pending_messages();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process pending conversations by delegating to the Message Handler.
|
||||
*/
|
||||
public static function cron_process_upcoming_conversations() {
|
||||
action_log("====================== Running Cron to process conversations ========================");
|
||||
// action_log("====================== Running Cron to process conversations ========================");
|
||||
RL_MailWarmer_Conversation_Handler::process_upcoming_conversations();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue