Skip to content
Snippets Groups Projects
scheduler.py 38.8 KiB
Newer Older
  • Learn to ignore specific revisions
  •         """
            Fehlerbehandlung
            @type     result: string
            @param    result: Ein Json-String
            """
            try:
                self.lq_error = simplejson.loads(result)
            except:
                return False
    
            try:
                if self.lq_error['success'] == 'success':
                    return True
                else:
                    return False
            except:
    
                return False
    
    
    class MessageTimer(threading.Timer):
        entry = None
    
        def __init__(self, diff, func, param, debug=False):
            threading.Timer.__init__(self, diff, func, param)
    
            self.func = func
            self.entry = param[0]
    
            if debug:
                print("MessageTimer starting @ " + str(self.entry.entry_start) + " source '" + str(self.entry.source) + "' In seconds: " + str(diff))
    
        def get_info(self):
            return "Calling " + str(self.func) + " @ " + str(self.entry.entry_start)