'Restore our monitors after a reload. This is called
by the server process.
Args:
server_reload (bool, optional): If this is False, it means
the server went through a cold reboot and all
non-persistent tickers must be killed.'

def restore(self, server_reload=True):

    self.monitors = defaultdict((lambda : defaultdict(dict)))
    restored_monitors = ServerConfig.objects.conf(key=self.savekey)
    if restored_monitors:
        restored_monitors = dbunserialize(restored_monitors)
        for (obj, fieldname, idstring, path, persistent, kwargs) in restored_monitors:
            try:
                if ((not server_reload) and (not persistent)):
                    continue
                if (('session' in kwargs) and (not kwargs['session'])):
                    continue
                (modname, varname) = path.rsplit('.', 1)
                callback = variable_from_module(modname, varname)
                if (obj and hasattr(obj, fieldname)):
                    self.monitors[obj][fieldname][idstring] = (callback, persistent, kwargs)
            except Exception:
                continue
    ServerConfig.objects.conf(key=self.savekey, delete=True)
