aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <freeit@nflexpvipecs.rus.uni-stuttgart.de>2016-02-12 05:29:37 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2016-02-12 06:20:01 +0100
commit802bfb83b0c7ac080a407f4d6fc89265c09f22ba (patch)
tree668ccb6aacc6ad1901c4b5860e553e8855df3577
parent9501a137529e0ac22873750484ddc781ae7e4f2a (diff)
downloadecs2-802bfb83b0c7ac080a407f4d6fc89265c09f22ba.tar.gz
ecs2-802bfb83b0c7ac080a407f4d6fc89265c09f22ba.zip
New cumulative garbage collection script.
This script could/should be called by crontab.
-rwxr-xr-xlib/garbage_collection.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/garbage_collection.sh b/lib/garbage_collection.sh
new file mode 100755
index 0000000..ac4e73a
--- /dev/null
+++ b/lib/garbage_collection.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+ps ax | grep -v 'grep.*ecs:gc_anonymous_participants' | grep -q 'rake ecs:gc_anonymous_participants' || RAILS_ENV=production bundle exec rake ecs:gc_anonymous_participants
+ps ax | grep -v 'grep.*ecs:gc_sys_auths' | grep -q 'rake ecs:gc_sys_auths' || RAILS_ENV=production bundle exec rake ecs:gc_sys_auths
+ps ax | grep -v 'grep.*ecs:gc_sub_participants' | grep -q 'rake ecs:gc_sub_participants' || RAILS_ENV=production bundle exec rake ecs:gc_sub_participants
+ps ax | grep -v 'grep.*vip:gc_exercises' | grep -q 'rake vip:gc_exercises' || RAILS_ENV=production bundle exec rake vip:gc_exercises
+ps ax | grep -v 'grep.*vip:gc_evaluations' | grep -q 'rake vip:gc_evaluations' || RAILS_ENV=production bundle exec rake vip:gc_evaluations
+ps ax | grep -v 'grep.*vip:gc_results' | grep -q 'rake vip:gc_results' || RAILS_ENV=production bundle exec rake vip:gc_results
+ps ax | grep -v 'grep.*vip:gc_solutions' | grep -q 'rake vip:gc_solutions' || RAILS_ENV=production bundle exec rake vip:gc_solutions