예제 #1
0
    def __decorator(func):
        if isinstance(value, int):
            set_meta_information(func, __order_key, value)
        else:
            set_meta_information(func, __order_key, int(must_extract_env_var(value)))

        return func
예제 #2
0
    def __decorator(func):
        if isinstance(value, bool):
            set_meta_information(func, __skip_key, value)
        else:
            set_meta_information(func, __skip_key,
                                 bool(must_extract_env_var_if_present(value)))

        return func
예제 #3
0
 def __decorator(func):
     if isinstance(value, Scheduler):
         scheduler = value
     elif isinstance(value, SchedulerType):
         scheduler = create_scheduler_from_type(value)
     else:
         scheduler = create_scheduler_from_string(must_extract_env_var_if_present(value))
     set_meta_information(func, __scheduler_key, scheduler)
     return func
예제 #4
0
 def __decorator(func):
     set_meta_information(func, __path_key,
                          must_extract_env_var_if_present(path))
     return func
예제 #5
0
 def __decorator(func):
     set_meta_information(func, __description_key,
                          must_extract_env_var_if_present(value))
     return func
예제 #6
0
 def __decorator(func):
     set_meta_information(func, __node_key,
                          must_extract_env_var_if_present(name))
     return func