def get_app(self): config = Config() scheduler_manager = SchedulerManager(config=config) scheduler_manager.init() node_manager = NodeManager(scheduler_manager) node_manager.init() secret_key = '123' with session_scope() as session: user = session.query(User).filter_by(username='******').first() user.password = encrypt_password('password', secret_key) session.add(user) session.commit() normal_user = session.query(User).filter_by( username='******').first() if not normal_user: normal_user = User() normal_user.username = '******' normal_user.is_admin = False normal_user.password = encrypt_password('passw0rd', secret_key) session.add(normal_user) session.commit() return make_app(scheduler_manager, node_manager, None, secret_key='123', enable_authentication=True)
def get_app(self): config = Config() scheduler_manager = SchedulerManager(config=config) scheduler_manager.init() node_manager = NodeManager(scheduler_manager) node_manager.init() return make_app(scheduler_manager, node_manager, None, secret_key='123')
def get_app(self): config = Config() scheduler_manager = SchedulerManager(config=config) scheduler_manager.init() node_manager = NodeManager(scheduler_manager) node_manager.init() webhook_daemon = WebhookDaemon(config, SpiderSettingLoader()) webhook_daemon.init() self.node_manager = node_manager return make_app(scheduler_manager, node_manager, webhook_daemon, secret_key='123', enable_node_registration=True)
def get_app(self): config = Config() scheduler_manager = SchedulerManager(config=config) scheduler_manager.init() node_manager = NodeManager(scheduler_manager) node_manager.init() runner_factory = RunnerFactory(config) return make_app(scheduler_manager, node_manager, None, secret_key='123', runner_factory=runner_factory)
def get_app(self): config = Config() scheduler_manager = SchedulerManager(config=config) scheduler_manager.init() node_manager = NodeManager(scheduler_manager) node_manager.init() webhook_daemon = WebhookDaemon(config, SpiderSettingLoader()) webhook_daemon.init() runner_cls = AddVersionHandlerTestProcessFail.ProcessFailProjectWorkspaceStub runner_factory = TestRunnerFactoryStub(runner_cls) return make_app(scheduler_manager, node_manager, webhook_daemon, secret_key='123', project_storage_dir='./test_data', runner_factory=runner_factory)
def get_app(self): config = Config() if self.scheduler_manager is None: self.scheduler_manager = SchedulerManager(Config()) self.scheduler_manager.init() node_manager = NodeManager(self.scheduler_manager) node_manager.init() webhook_daemon = WebhookDaemon(config, SpiderSettingLoader()) webhook_daemon.init() return make_app(self.scheduler_manager, node_manager, webhook_daemon, secret_key='123', project_storage_dir=self.project_storage_dir, runner_factory=self.runner_factory, project_manager=self.project_manager)