Disabled logging when the scheduler runs. Adjusted the number of conversations processed by the schedulers at a time

This commit is contained in:
Ruben Ramirez 2025-03-28 13:18:38 -05:00
parent 2c104022df
commit dd22cf8777
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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();
}
}