예제 #1
0
 def run_once(self):
     test = getattr(self, self.test)
     try:
         test()
     except Exception as e:
         self.nfail += 1
         logging.error(e)
예제 #2
0
 def run_once(self):
     test = getattr(self, self.test)
     try:
         test()
     except Exception as e:
         self.nfail += 1
         logging.error(e)
예제 #3
0
    def run_once(self, test):

        self.test = test
        test = getattr(self, test)
        try:
            test()
        except Exception as e:
            self.failcount += 1
            logging.error(e)
예제 #4
0
    def run_once(self, test):

        self.test = test
        test = getattr(self, test)
        try:
            test()
        except Exception as e:
            self.failcount += 1
            logging.error(e)
예제 #5
0
 def run_once(self, test, wait_time):
     '''Runs the test, writes test success if cron successfully executes, else
        writes test failed.
        Resets /etc/crontab
        Pass 0:Normal operation of run-parts
        Pass 1:run-parts with jobs.deny
        Pass 2:run-parts with jobs.allow
     '''
     self.test = test
     sleep(wait_time)
     test = getattr(self, test)
     try:
         test(wait_time)
     except Exception as e:
         self.nfail = self.nfail + 1
         logging.error(e)
예제 #6
0
 def run_once(self, test, wait_time):
     '''Runs the test, writes test success if cron successfully executes, else
        writes test failed.
        Resets /etc/crontab
        Pass 0:Normal operation of run-parts
        Pass 1:run-parts with jobs.deny
        Pass 2:run-parts with jobs.allow
     '''
     self.test = test
     sleep(wait_time)
     test = getattr(self, test)
     try:
         test(wait_time)
     except Exception as e:
         self.nfail = self.nfail + 1
         logging.error(e)