[PR #25] [CLOSED] n_pings is unnecessary #866

Closed
opened 2026-02-25 23:43:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/healthchecks/healthchecks/pull/25
Author: @diwu1989
Created: 12/31/2015
Status: Closed

Base: masterHead: countPings


📝 Commits (1)

  • 679ab9c dont need to keep track of n-pings

📊 Changes

6 files changed (+33 additions, -31 deletions)

View changed files

📝 hc/api/admin.py (+1 -1)
hc/api/management/commands/fillnpings.py (+0 -13)
📝 hc/api/management/commands/prunepings.py (+10 -7)
hc/api/migrations/0021_remove_check_n_pings.py (+19 -0)
📝 hc/api/models.py (+3 -7)
📝 hc/api/views.py (+0 -3)

📄 Description

you don't need to do the book-keeping of n-pings yourself
it's just a count of the number of pings for that check, and can be expressed in a single SQL
the code for pruning the pings and re-setting the n-pings value is also vulnerable to race condition


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/healthchecks/healthchecks/pull/25 **Author:** [@diwu1989](https://github.com/diwu1989) **Created:** 12/31/2015 **Status:** ❌ Closed **Base:** `master` ← **Head:** `countPings` --- ### 📝 Commits (1) - [`679ab9c`](https://github.com/healthchecks/healthchecks/commit/679ab9cd19bacffb7ecadf156125a00426c10fcd) dont need to keep track of n-pings ### 📊 Changes **6 files changed** (+33 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `hc/api/admin.py` (+1 -1) ➖ `hc/api/management/commands/fillnpings.py` (+0 -13) 📝 `hc/api/management/commands/prunepings.py` (+10 -7) ➕ `hc/api/migrations/0021_remove_check_n_pings.py` (+19 -0) 📝 `hc/api/models.py` (+3 -7) 📝 `hc/api/views.py` (+0 -3) </details> ### 📄 Description you don't need to do the book-keeping of n-pings yourself it's just a count of the number of pings for that check, and can be expressed in a single SQL the code for pruning the pings and re-setting the n-pings value is also vulnerable to race condition --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:43:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#866
No description provided.