Skip to content

fix: queue PKI Alert V2 run once a day#5384

Merged
carlosmonastyrski merged 1 commit intomainfrom
fix/pki-alert-queue
Feb 5, 2026
Merged

fix: queue PKI Alert V2 run once a day#5384
carlosmonastyrski merged 1 commit intomainfrom
fix/pki-alert-queue

Conversation

@carlosmonastyrski
Copy link
Contributor

Context

Small fix on the PKI alert v2 queue where it was mistakenly set to run every minute in a previous commit instead of at 00:00 every day

Screenshots

Steps to verify the change

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Read the contributing guide

@maidul98
Copy link
Collaborator

maidul98 commented Feb 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR corrects a critical configuration error where the PKI alert V2 processing queue was mistakenly scheduled to run every minute (* * * * *) instead of once daily at midnight UTC (0 0 * * *).

Key Changes:

  • Fixed cron schedule in queueService.schedulePg() call on line 214
  • Restores intended behavior: job named DailyPkiAlertV2Processing should run daily, not every minute
  • Prevents unnecessary database queries, alert evaluations, and potential performance degradation

Background:
The every-minute schedule was used for testing during development of the PKI-100 feature branch. While it was fixed in commit bb6b1940d, the fix didn't make it into the feature branch before it was merged to main, reintroducing the testing configuration.

Confidence Score: 5/5

  • This PR is completely safe to merge - it's a single-character configuration fix that restores intended behavior
  • The change is trivial, well-understood, and critical to fix. It only modifies a cron schedule string from every minute to daily, matching the function name and deduplication logic that assumes daily execution. No logic changes, no security concerns.
  • No files require special attention

Important Files Changed

Filename Overview
backend/src/services/pki-alert-v2/pki-alert-v2-queue.ts Fixed cron schedule from * * * * * (every minute) to 0 0 * * * (daily at midnight UTC) for PKI alert processing

@carlosmonastyrski carlosmonastyrski merged commit e5b19f5 into main Feb 5, 2026
10 of 11 checks passed
@saifsmailbox98
Copy link
Contributor

@carlosmonastyrski, thanks for taking the time to test my code! I know it ended up being more work than expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants