Browse files

mc_flushall via django's cache

  • Loading branch information...
1 parent 44308cd commit df085273612f84f7a2004236a06712b773acfbb6 @MeirKriheli MeirKriheli committed Mar 19, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 fabfile.py
View
10 fabfile.py
@@ -100,10 +100,14 @@ def db_show_replication():
# memcache commands
-@roles('memcache')
+@roles('web')
+@runs_once
def mc_flushall():
- run('echo flush_all | telnet localhost 11211')
-
+ #run('echo flush_all | telnet localhost 11211')
+ virtualenv(
+ "DJANGO_SETTINGS_MODULE='knesset.settings' " +
+ "python -c 'from django.core.cache import cache; cache.clear()'"
+ )
# commands for all servers

0 comments on commit df08527

Please sign in to comment.