Esempio n. 1
0
 def _make_kube_watcher(self):
     resource_version = KubeResourceVersion.get_current_resource_version()
     watcher = KubernetesJobWatcher(self.namespace, self.watcher_queue,
                                    resource_version, self.worker_uuid,
                                    self.kube_config)
     watcher.start()
     return watcher
Esempio n. 2
0
 def _make_kube_watcher(self) -> KubernetesJobWatcher:
     resource_version = KubeResourceVersion.get_current_resource_version()
     watcher = KubernetesJobWatcher(watcher_queue=self.watcher_queue,
                                    resource_version=resource_version,
                                    worker_uuid=self.worker_uuid,
                                    kube_config=self.kube_config)
     watcher.start()
     return watcher
Esempio n. 3
0
 def _make_kube_watcher(self):
     resource_version = KubeResourceVersion.get_current_resource_version()
     watcher = KubernetesJobWatcher(
         watcher_queue=self.watcher_queue,
         namespace=self.kube_config.kube_namespace,
         multi_namespace_mode=self.kube_config.multi_namespace_mode,
         resource_version=resource_version,
         worker_uuid=self.worker_uuid,
         kube_config=self.kube_config)
     watcher.start()
     return watcher
Esempio n. 4
0
 def test_reset_resource_version(self):
     session = settings.Session()
     version = KubeResourceVersion.reset_resource_version(session)
     self.assertEqual(version, '0')
     self.assertEqual(
         KubeResourceVersion.get_current_resource_version(session), '0')
Esempio n. 5
0
 def test_checkpoint_resource_version(self):
     session = settings.Session()
     KubeResourceVersion.checkpoint_resource_version('7', session)
     self.assertEqual(
         KubeResourceVersion.get_current_resource_version(session), '7')
 def _make_kube_watcher(self):
     resource_version = KubeResourceVersion.get_current_resource_version(self._session)
     watcher = KubernetesJobWatcher(self.namespace, self.watcher_queue,
                                    resource_version, self.worker_uuid)
     watcher.start()
     return watcher
Esempio n. 7
0
 def test_reset_resource_version(self):
     session = settings.Session()
     version = KubeResourceVersion.reset_resource_version(session)
     self.assertEqual(version, '0')
     self.assertEqual(KubeResourceVersion.get_current_resource_version(session), '0')
Esempio n. 8
0
 def test_checkpoint_resource_version(self):
     session = settings.Session()
     KubeResourceVersion.checkpoint_resource_version('7', session)
     self.assertEqual(KubeResourceVersion.get_current_resource_version(session), '7')