Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: using only update_message_processing_status to change status #201

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

geekbrother
Copy link
Contributor

@geekbrother geekbrother commented Nov 13, 2023

Description

This PR adds a small refactor to use update_message_processing_status helper function to change the message status instead of manually running the SQL.
This is useful for tracking metrics inside the update_message_processing_status function and following the DRY.

  • Making update_message_processing_status only to change status to be used with PgPool and Pg transactions,
  • Refactor the place of using it.

Resolves #189

How Has This Been Tested?

Just a build-and-up local smoke test.

Due Diligence

@geekbrother geekbrother self-assigned this Nov 13, 2023
@geekbrother geekbrother changed the title refactor: using update_message_processing_status only to change status refactor: using only update_message_processing_status to change status Nov 13, 2023
@geekbrother geekbrother force-pushed the max/feat/observe_queue_count branch 3 times, most recently from 28e45d3 to 08a6b6d Compare November 13, 2023 17:28
@geekbrother geekbrother force-pushed the max/refactor/use_update_message_processing_status branch from a7720bd to 0128598 Compare November 13, 2023 17:43
@geekbrother geekbrother marked this pull request as ready for review November 13, 2023 17:50
Copy link
Member

@chris13524 chris13524 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/services/publisher_service/helpers.rs Outdated Show resolved Hide resolved
@geekbrother geekbrother force-pushed the max/feat/observe_queue_count branch 2 times, most recently from 9830d5c to 9f7f6ba Compare November 14, 2023 22:17
Base automatically changed from max/feat/observe_queue_count to main November 15, 2023 22:27
@geekbrother geekbrother force-pushed the max/refactor/use_update_message_processing_status branch from 077951d to 6d22cef Compare November 16, 2023 09:15
@geekbrother geekbrother merged commit 864c6e9 into main Nov 16, 2023
10 checks passed
@geekbrother geekbrother deleted the max/refactor/use_update_message_processing_status branch November 16, 2023 09:28
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.

chore: add Prometheus and Grafana stats for the new queued approach
2 participants