5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-03 10:26:08 +00:00

Merge branch 'blazer' into panel.sutty.nl

This commit is contained in:
f 2022-06-11 19:50:05 -03:00
commit 82eb6e49dd
3 changed files with 17 additions and 0 deletions

View file

@ -1 +1,2 @@
cleanup: rake cleanup:everything
stats: bundle exec rake stats:process_all

11
lib/tasks/stats.rake Normal file
View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
namespace :stats do
desc 'Process stats'
task process_all: :environment do
Site.all.pluck(:id).each do |site_id|
UriCollectionJob.perform_now site_id: site_id, once: true
StatCollectionJob.perform_now site_id: site_id, once: true
end
end
end

View file

@ -8,3 +8,8 @@ check program access_logs
with path "/srv/bin/access_logs" as uid "rails" and gid "www-data"
every "0 0 * * *"
if status != 0 then alert
check program stats
with path "/usr/bin/foreman run -f /srv/Procfile -d /srv stats" as uid "rails" gid "www-data"
every "0 1 * * *"
if status != 0 then alert