Pēteris Caune
9a0888aacd
Update sendalerts to log per-notification send times
To send notifications, sendalerts calls Flip.send_alerts().
I updated Flip.send_alerts() to be a generator, and to yield
a (channel, error, send_time_in_seconds) triple per sent
notification.
4 years ago
Pēteris Caune
66a1a108bf
When decoding inbound emails, decode encoded headers. Fixes #420
4 years ago
Pēteris Caune
43e56ce788
Add support for multiple, comma-separated keywords (cc: #396 )
4 years ago
Pēteris Caune
0d03e3f00b
Add "Failure Keyword" filtering for inbound emails (cc: #396 )
4 years ago
Pēteris Caune
a18eb134f5
Refactor: change Check.get_status(with_started=...) default value from True to False (with_started=False is or will be useful in more places)
4 years ago
Pēteris Caune
4f6f1d9f66
Fix sendalerts crash loop when encountering a bad cron schedule
5 years ago
Pēteris Caune
ac4f1ca059
Log slow sendalerts.notify runs to stdout
5 years ago
Pēteris Caune
4a7074418a
Track the time spent sending notifications for each flip
5 years ago
Pēteris Caune
9f2638bf72
The sendalerts commands measures notification dwell time and reports it over statsd protocol. Experimental, may go away in a future commit.
5 years ago
Pēteris Caune
6bc4948d00
Removing obsolete comment: the index is defined in hc.api.models.Check.Meta
5 years ago
Pēteris Caune
15ba415298
`senddeletionnotices` command skips profiles with recent last_active_date
5 years ago
Pēteris Caune
2bb769f7bb
Send monthly reports on 1st of every month, not randomly during the month
5 years ago
Pēteris Caune
c0d808271e
Add the `pruneflips` management command.
5 years ago
Pēteris Caune
e0f161157d
Fix `prunepings` and `prunepingsslow`, fixes #264
5 years ago
Pēteris Caune
cdfc9840a7
Source formatted with Black
6 years ago
Pēteris Caune
6040759601
Add the `prunetokenbucket` management command.
6 years ago
Pēteris Caune
2a7129f8c8
Explicit decode_data=False (otherwise, py3.5 passes str, py3.6+ passes bytes). Should fix #242
6 years ago
Pēteris Caune
cb1b792d6c
smtpd: get a new db connection for every incoming email. cc: #213
6 years ago
Pēteris Caune
7ecd0b606d
Quicker prunenotifications, skip checks with low n_pings values.
6 years ago
Pēteris Caune
fba8806e97
Prepare for the removal of Member.team_id
6 years ago
Pēteris Caune
f357cd3305
Prepare for removing Check.user_id, Channel.user_id, Profile.current_team_id
6 years ago
Pēteris Caune
5edcd42033
Add the "Email Settings..." dialog and the "Subject Must Contain" setting
6 years ago
Pēteris Caune
be4c4f7a26
set Check.user to not null, add uniqueness constraint to Check.code
6 years ago
Pēteris Caune
179b085df4
Move Check.send_alert() to Flip.send_alerts()
6 years ago
Pēteris Caune
2f4b373e12
More test cases. Check.is_down() is redundant, removing.
6 years ago
Pēteris Caune
5f9ebb178c
Rename "Check.get_alert_after" to a now more fitting "Check.going_down_after"
6 years ago
Pēteris Caune
481848a749
Add "/ping/<code>/start" API endpoint
6 years ago
Pēteris Caune
11f65ff7aa
Optimize db query in `sendalerts`
6 years ago
Pēteris Caune
5be6c403a4
Flip model, for tracking status changes of the Check objects.
6 years ago
Pēteris Caune
b4e53431cd
Obsolete – we don't create anonymous checks any more.
6 years ago
Dan Faulknor
8265ac5a97
Fix for Python 3.6
6 years ago
Pēteris Caune
5cf6f1b51e
Merge Check.get_status() and Check.in_grace_period() into one.
This avoids duplicate calls to Check.get_grace_start() in several places.
7 years ago
Pēteris Caune
fbe77c9e0a
Silence output from management commands when running tests.
7 years ago
Pēteris Caune
fc176cd832
`settelegramwebhook` now sends a correct "allowed_updates" field.
7 years ago
Pēteris Caune
1392226538
sendalerts was not using the api_check (status, user_id, alert_after) index so removing it. The index was not selective enough.
7 years ago
Pēteris Caune
266fbd225d
sendreports doesn't send nags if nag_period=0 ("disabled"). This would result in an infinite loop of nag emails.
7 years ago
Pēteris Caune
ebbc898d02
Experimental `settelegramwebhook` management command
7 years ago
Pēteris Caune
f2a2241b6b
Email listener: "./manage.py smtpd"
7 years ago
Pēteris Caune
d520706c27
Adding an option to send daily or hourly reminders if any check is down. Fixes #48
7 years ago
Pēteris Caune
8d0a2f2eaf
Remove startup check for update_alert_after trigger, remove drop_triggers command.
7 years ago
Pēteris Caune
09e5129bbe
sendalerts reuses database connection.
8 years ago
Pēteris Caune
d7d21b0959
Pause before next report to avoid hitting sending quota
8 years ago
Pēteris Caune
9dcb1678f3
--no-threads flag for sendalerts command
8 years ago
Ronald Ip
7900a201c1
Add --no-loop option to sendalerts management command.
Allow `sendalerts` to be run by an external scheduler, on a one-shot
basis, exiting after all alerts have been sent.
8 years ago
Pēteris Caune
d1b4643b45
Obsolete
8 years ago
Pēteris Caune
0b6d484bd5
"prunenotifications" management command
8 years ago
Pēteris Caune
c6d5e64286
Warn about obsolete `update_alert_after` trigger.
8 years ago
Pēteris Caune
ce57a1cc8b
Calculate `alert_after` in Python code instead of a database trigger. This will allow complex calculations down the road.
8 years ago
Pēteris Caune
252fa1f884
sendreports now can be run concurrently too
8 years ago
Pēteris Caune
b5a0ff3538
Handle concurrent sendalerts using QuerySet.update(). Fixes #39
8 years ago