From e907ad37d44d5ed7b4894e37c62da673e2b811a6 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 21 Aug 2017 16:51:35 +0100 Subject: [PATCH] Replace all leaderboard scripts with the single recalc script --- script/daily_leaderboards | 11 ----------- script/monthly_leaderboards | 9 --------- script/recalc_leaderboards | 5 +++++ script/weekly_leaderboards | 9 --------- 4 files changed, 5 insertions(+), 29 deletions(-) delete mode 100755 script/daily_leaderboards delete mode 100755 script/monthly_leaderboards create mode 100644 script/recalc_leaderboards delete mode 100755 script/weekly_leaderboards diff --git a/script/daily_leaderboards b/script/daily_leaderboards deleted file mode 100755 index 7860702..0000000 --- a/script/daily_leaderboards +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - -YESTERDAY=`date -d "yesterday" +%F` - - -MOJO_MODE=production ./script/pear-local_loop leaderboard -t daily_total -d $YESTERDAY -MOJO_MODE=production ./script/pear-local_loop leaderboard -t daily_count -d $YESTERDAY -MOJO_MODE=production ./script/pear-local_loop leaderboard -t all_time_total -d $YESTERDAY -MOJO_MODE=production ./script/pear-local_loop leaderboard -t all_time_count -d $YESTERDAY diff --git a/script/monthly_leaderboards b/script/monthly_leaderboards deleted file mode 100755 index 5aa101c..0000000 --- a/script/monthly_leaderboards +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - -YESTERDAY=`date -d "1 month ago" +%F` - - -MOJO_MODE=production ./script/pear-local_loop leaderboard -t monthly_total -d $YESTERDAY -MOJO_MODE=production ./script/pear-local_loop leaderboard -t monthly_count -d $YESTERDAY diff --git a/script/recalc_leaderboards b/script/recalc_leaderboards new file mode 100644 index 0000000..73ce46c --- /dev/null +++ b/script/recalc_leaderboards @@ -0,0 +1,5 @@ +#! /bin/bash + +eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) + +MOJO_MODE=production ./script/pear-local_loop recalc_leaderboards diff --git a/script/weekly_leaderboards b/script/weekly_leaderboards deleted file mode 100755 index 28da9fc..0000000 --- a/script/weekly_leaderboards +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) - -YESTERDAY=`date -d "1 week ago" +%F` - - -MOJO_MODE=production ./script/pear-local_loop leaderboard -t weekly_total -d $YESTERDAY -MOJO_MODE=production ./script/pear-local_loop leaderboard -t weekly_count -d $YESTERDAY