blob: 4b7608063d50b3e9926e3a7d6e2d07aeee89fb05 [file] [log] [blame]
def handle(controller_site):
from core.models import ControllerSite, Site
try:
my_status_code = int(controller_site.backend_status[0])
try:
his_status_code = int(controller_site.site.backend_status[0])
except:
his_status_code = 0
if (my_status_code not in [0,his_status_code]):
controller_site.site.backend_status = controller_site.backend_status
controller_site.site.save(update_fields = ['backend_status'])
except Exception,e:
print str(e)
pass