예제 #1
0
 def test_queue_parse(self):
     """
     Ensure that if the configuration file includes an
     explicit list of queues, it's used for CELERYD_QUEUES
     """        
     conf = configuration.initconf()
     conf.update_with_module('queues')        
     
     c = CeleryCommand('celeryd')
     c.config = conf
     
     self.assertEqual(c.determine_queues(), 'example,testing123')
예제 #2
0
    def test_queue_autodiscover(self):
        """
        Ensure that if the configuration file *does not* include an
        explicit list of queues, a list of queues is auto-discovered.
        """        
        path = os.path.join(os.path.dirname(__file__), 'configs', 'discovery.py')
        configuration.set_config(path)  
        
        conf = base_app.conf

        c = CeleryCommand('celeryd')
        c.config = conf

        self.assertEqual(c.determine_queues(), 'default,strings,math')