Exemple #1
0
    def test_create_threadpool_config_no_config(self):
        config = SchedulerConfiguration()
        self.assertIsNotNone(config)

        data = {}
        config._create_threadpool_config(data)
        self.assertEquals(data['apscheduler.executors.default'], {'class': 'apscheduler.executors.pool:ThreadPoolExecutor'})
Exemple #2
0
    def test_create_threadpool_config(self):
        config = SchedulerConfiguration()
        self.assertIsNotNone(config)

        config._threadpool = SchedulerThreadPoolConfiguration()
        config._threadpool._max_workers = 3

        data = {}
        config._create_threadpool_config(data)
        self.assertEquals(data['apscheduler.executors.default'], {'class': 'apscheduler.executors.pool:ThreadPoolExecutor', 'max_workers': '3'})