def enqueue_periodic_commands(self, dt=None):
     dt = dt or datetime.datetime.now()
     
     for command in registry.get_periodic_commands():
         if command.validate_datetime(dt):
             self.enqueue(command)
Example #2
0
    def enqueue_periodic_commands(self, dt=None):
        dt = dt or datetime.datetime.now()

        for command in registry.get_periodic_commands():
            if command.validate_datetime(dt):
                self.enqueue(command)
Example #3
0
 def test_registry_get_periodic_commands(self):
     # three, one for the base class, one for the TestPeriodicCommand, and
     # one for the decorated function
     self.assertEqual(len(registry.get_periodic_commands()), 3)
Example #4
0
 def test_registry_get_periodic_commands(self):
     # three, one for the base class, one for the TestPeriodicCommand, and
     # one for the decorated function
     self.assertEqual(len(registry.get_periodic_commands()), 3)