File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
from fabric .api import *
2
2
3
- from cache import purge as cache_purge
3
+ import cache
4
4
5
5
@task
6
6
@runs_once
@@ -16,5 +16,5 @@ def fastly_purge(*args):
16
16
@task
17
17
def purge_all (* args ):
18
18
"Purge items from Fastly and cache machines, eg \" /one,/two,/three\" "
19
- execute (cache_purge , * args )
19
+ execute (cache . purge , * args )
20
20
execute (fastly_purge , * args )
Original file line number Diff line number Diff line change 2
2
from fabric .utils import error
3
3
import re
4
4
5
+ import nagios
6
+
5
7
@task
6
8
def uptime ():
7
9
"""Show uptime and load"""
@@ -89,8 +91,7 @@ def reboot():
89
91
@task
90
92
def force_reboot ():
91
93
"""Schedule a host for downtime in nagios and force reboot (even if not required)"""
92
- from nagios import schedule_downtime
93
- execute (schedule_downtime , env ['host_string' ])
94
+ execute (nagios .schedule_downtime , env ['host_string' ])
94
95
run ("sudo shutdown -r now" )
95
96
96
97
@task
@@ -100,8 +101,7 @@ def poweroff():
100
101
Usage:
101
102
fab production -H frontend-1.frontend.production vm.poweroff
102
103
"""
103
- from nagios import schedule_downtime
104
- execute (schedule_downtime , env ['host_string' ])
104
+ execute (nagios .schedule_downtime , env ['host_string' ])
105
105
run ("sudo poweroff" )
106
106
107
107
@task
You can’t perform that action at this time.
0 commit comments