Esempio n. 1
0
 def test_make(self):
     app_handle = make_app_handle(
         scheduler_backend="local",
         session_name="my_session",
         app_id="my_app_id_1234",
     )
     self.assertEqual("local://my_session/my_app_id_1234", app_handle)
Esempio n. 2
0
 def _schedule(self, dryrun_info: AppDryRunInfo) -> AppHandle:
     scheduler_backend = dryrun_info._scheduler
     sched = self._scheduler(scheduler_backend)
     app_id = sched.schedule(dryrun_info)
     app_handle = make_app_handle(scheduler_backend, self._name, app_id)
     self._apps[app_handle] = dryrun_info._app
     return app_handle
Esempio n. 3
0
 def _run(
     self,
     app: Application,
     scheduler: SchedulerBackend,
     cfg: RunConfig,
 ) -> str:
     sched = self._scheduler(scheduler)
     app_id = sched.submit(app, cfg)
     app_handle = make_app_handle(scheduler, self._name, app_id)
     self._apps[app_handle] = app
     return app_handle