Exemple #1
0
    def _onScheduleTimer(self, event):
        """ Schedule timer """
        if appcfg.options[appcfg.CFG_AUTO_UPDATE_TIMED]:
            # check if we passed a day
            d = datetime.datetime.now() - appcfg.last_timed_update
            if d.days > 0 or not appcfg.initially_updated:
                tl = appcfg.options[appcfg.CFG_TIMED_UPDATE].split(':')
                if len(tl) > 1:
                    try:
                        check_hour = int(tl[0])
                        check_min = int(tl[1])
                    except ValueError:
                        appcfg.options[appcfg.CFG_AUTO_UPDATE_TIMED] = False
                        return

                # compare two equal dates, but only the time
                # we do this to also bridge a check more then one day
                d1 = datetime.datetime.now()
                d2 = datetime.datetime(d1.year,
                                       d1.month,
                                       d1.day,
                                       hour=check_hour,
                                       minute=check_min)
                if d1 > d2:
                    appcfg.initially_updated = True
                    appcfg.last_timed_update = datetime.datetime.now()
                    viewmgr.get_all_series()
Exemple #2
0
    def _onScheduleTimer(self, event):
        """ Schedule timer """
        if appcfg.options[appcfg.CFG_AUTO_UPDATE_TIMED]:
            # check if we passed a day
            d = datetime.datetime.now() - appcfg.last_timed_update
            if d.days > 0 or not appcfg.initially_updated:
                tl = appcfg.options[appcfg.CFG_TIMED_UPDATE].split(':')
                if len(tl) > 1:
                    try:
                        check_hour = int(tl[0])
                        check_min = int(tl[1])
                    except ValueError:
                        appcfg.options[appcfg.CFG_AUTO_UPDATE_TIMED] = False
                        return

                # compare two equal dates, but only the time
                # we do this to also bridge a check more then one day
                d1 = datetime.datetime.now()
                d2 = datetime.datetime(d1.year, d1.month, d1.day, hour = check_hour, minute = check_min)
                if d1 > d2:
                    appcfg.initially_updated = True
                    appcfg.last_timed_update = datetime.datetime.now()
                    viewmgr.get_all_series()
Exemple #3
0
 def _onUpdateAll(self, event):
     """
     Update all event, will send all series to the receive thread, where they 
     will be updated as they come back in 
     """
     viewmgr.get_all_series()
Exemple #4
0
 def _onUpdateAll(self, event):
     viewmgr.get_all_series()
Exemple #5
0
 def _onUpdateAll(self, event):
     viewmgr.get_all_series()