from datetime import datetime from agent import pipeline, source, destination, di from agent.modules.logger import get_logger logger = get_logger(__name__, stdout=True) di.init() for pipeline_ in pipeline.repository.get_all(): pipeline_.created_at = datetime.now() pipeline.repository.save(pipeline_) logger.info(f'Updated created_at column for pipeline ID = {pipeline_.id}') for source_ in source.repository.get_all(): source_.created_at = datetime.now() source.repository.save(source_) logger.info(f'Updated created_at column for source ID = {source_.id}') destination_ = destination.repository.get() destination_.created_at = datetime.now() destination.repository.save(destination_) logger.info(f'Updated created_at column for destination')
def api_client(): main.app.testing = True with main.app.test_client() as client: di.init() return client
def before_request_func(): di.init()
def agent_entry_point(): di.init() agent()
def api_client(): main.app.testing = True with main.app.test_client() as client: di.init() yield client
def cli_runner(): di.init() yield CliRunner()