mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 23:15:49 +03:00
[PR #25] [CLOSED] n_pings is unnecessary #866
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#866
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/healthchecks/healthchecks/pull/25
Author: @diwu1989
Created: 12/31/2015
Status: ❌ Closed
Base:
master← Head:countPings📝 Commits (1)
679ab9cdont 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.