blob: 4b7608063d50b3e9926e3a7d6e2d07aeee89fb05 [file] [log] [blame]
Scott Bakerb63ea792016-08-11 10:24:48 -07001def handle(controller_site):
2 from core.models import ControllerSite, Site
3
4 try:
5 my_status_code = int(controller_site.backend_status[0])
6 try:
7 his_status_code = int(controller_site.site.backend_status[0])
8 except:
9 his_status_code = 0
10
11 if (my_status_code not in [0,his_status_code]):
12 controller_site.site.backend_status = controller_site.backend_status
13 controller_site.site.save(update_fields = ['backend_status'])
14 except Exception,e:
15 print str(e)
16 pass