Skip to content

Commit

Permalink
journalist notifications: today's submissions count 1h before reboot
Browse files Browse the repository at this point in the history
If the sysadmin chose to:

a) activate journalist notifications
b) modify the reboot time

It is possible that the submissions count is older than expected. For
instance, if the submissions count is done at midnight and the machine
reboots at 11pm, the journalist will receive a submission count that
is about 24h old and does not include submissions received in the past
23h00.

The information sent to the journalist is correct, only it is older
than one would expect.

The submissions count is updated one hour before the machine reboots
time so it is no more than one hour old, regardless of the reboot time
chosen by the admin.
  • Loading branch information
Loic Dachary committed May 29, 2018
1 parent 06efc45 commit 3ef83d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions install_files/ansible-base/group_vars/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ install_local_packages: true
# the Apache service is configured correctly.
securedrop_app_install_from_repo: False

daily_reboot_time: 4 # An integer between 0 and 23
3 changes: 2 additions & 1 deletion install_files/ansible-base/roles/app/tasks/setup_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
cron:
name: Update the number of submissions in the past 24h
job: "{{ securedrop_code }}/manage.py were-there-submissions-today"
special_time: daily
# 0 -> 23, 1 -> 0, 2 -> 1, ... 23 -> 22
hour: "{{ (daily_reboot_time + 23) % 24 }}"
tags:
- cron

0 comments on commit 3ef83d5

Please sign in to comment.