def test_batch(): with open("./test_data/batch.json", "r") as j: data = json.load(j) batch = Batch(**data) batch.run() return (batch)
def get_instance(): if BatchSingleton.__instance__ is None: new_batch_dict = { "status": "PROCESSING", "createdAt": time.localtime(time.time()), "updatedAt": time.localtime(time.time()) } BatchSingleton.__instance__ = batch_dao.add_batch( Batch(new_batch_dict)) return BatchSingleton.__instance__ else: return BatchSingleton.__instance__
def build(config): batch = Batch(config = config.path) batch.build_jobs(*nodes) batch.build_shell_variables(**argument_hash(config)) return batch