Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #4
0
 def __decorator(func):
     set_meta_information(func, __path_key,
                          must_extract_env_var_if_present(path))
     return func
Beispiel #5
0
 def __decorator(func):
     set_meta_information(func, __description_key,
                          must_extract_env_var_if_present(value))
     return func
Beispiel #6
0
 def __decorator(func):
     set_meta_information(func, __node_key,
                          must_extract_env_var_if_present(name))
     return func