예제 #1
0
def dbnd_kube_check(check_time=datetime.datetime.now(), sleep_time_sec=120):
    # type: ( datetime.datetime, int)-> str
    config.log_current_config(as_table=True)
    logger.info("Running Kube Sanity Check!")
    if sleep_time_sec:
        logger.info("sleeping for %s", sleep_time_sec)
        sleep(sleep_time_sec)
    return "Databand checked at %s" % check_time
예제 #2
0
    def test_prod_immutable_output_dict_prod(self):
        env = get_databand_context().env
        prod_env = env.clone(production=True)
        task = TProdImmutbaleOutputs(task_env=prod_env)
        assert task.task_enabled_in_prod
        assert task.task_signature[:5] not in str(task.splits)
        config.log_current_config()
        actual = assert_run_task(task)

        print(actual)
예제 #3
0
 def run(self):
     config.log_current_config(sections=["MyConfig"], as_table=True)
     c = MyConfig()
     logger.warning("_p=%s _q=%s", c.mc_p, c.mc_q)
     self.t_output = [c.mc_p, c.mc_q]
예제 #4
0
 def run(self):
     config.log_current_config(sections=["MyConfig"], as_table=True)
     c = MyConfig()
     self.t_output = [c.mc_p, c.mc_q]