Skip to content

Commit 78dc922

Browse files
Copilotkatsar0v
andcommitted
Address code review feedback with improved comments
Co-authored-by: katsar0v <7236157+katsar0v@users.noreply.github.com>
1 parent 536405b commit 78dc922

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

includes/Admin/class-admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ public function render_dashboard_widget(): void {
582582
global $wpdb;
583583

584584
// Get queue statistics.
585+
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Static query with no user input, caching not needed for dashboard widget.
585586
$queue_stats = $wpdb->get_row(
586587
"SELECT
587588
SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END) as pending,

includes/services/class-cron-handler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ public function init() {
5454
public function process_queue() {
5555
global $wpdb;
5656

57-
// Record the last cron run timestamp.
57+
// Record the cron run timestamp at the start of processing.
58+
// This indicates when the cron was last triggered, useful for verifying cron health.
5859
update_option( 'mskd_last_cron_run', time() );
5960

60-
// First, recover stuck emails (processing for too long)
61+
// First, recover stuck emails (processing for too long).
6162
$this->recover_stuck_emails();
6263

6364
// Get the configured batch size (emails per minute).

0 commit comments

Comments
 (0)