sleep

Showcase sleep cmd

Demo

source

Main task yaml file
    tasks:
    - name: task
      desc: generate logs
      task:
      - func: shell
        do:
        - echo 'hello'
      - func: cmd
        do:
        - name: sleep
          cmd: 2000
      - func: cmd
        do:
        - name: print
          cmd: world
      - func: call
        do:
        - '{{.loopitem}}'
        loop: [impl1, impl2]
    - name: impl1
      task:
      - func: cmd
        do:
        - name: print
          cmd: hello
      - func: cmd
        do:
        - name: sleep
          cmd: 1000
    - name: impl2
      task:
      - func: cmd
        do:
        - name: print
          cmd: world
    
Main log file
    loading [Config]:  ./tests/functests/upconfig.yml
    Main config:
                 Version -> 1.0.0
                  RefDir -> ./tests/functests
                 WorkDir -> cwd
              AbsWorkDir -> /up_project/up
                TaskFile -> c0087
                 Verbose -> vvv
              ModuleName -> self
               ShellType -> /bin/sh
           MaxCallLayers -> 8
                 Timeout -> 3600000
     MaxModuelCallLayers -> 256
               EntryTask -> task
      ModRepoUsernameRef -> 
      ModRepoPasswordRef -> 
    work dir: /up_project/up
    -exec task: task
    loading [Task]:  ./tests/functests/c0087
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    Task1: [task ==> task: generate logs ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "up_runtime_task_layer_number": 0
    })
    
    cmd( 1):
    echo 'hello'
    
    -
    hello
    
    -
     .. ok
    . ok
    -Step2:
    self: final context exec vars:
    
    (*core.Cache)({
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 0
    })
    
    ~SubStep1: [sleep:  ]
    sleeping 2000 milli seconds
    ....................
    -Step3:
    self: final context exec vars:
    
    (*core.Cache)({
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 0
    })
    
    ~SubStep1: [print:  ]
    world
    -Step4:
    self: final context exec vars:
    
    (*core.Cache)({
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 0
    })
    
    =Task2: [task ==> impl1:  ]
    --Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "loopindex1": 1,
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 1,
      "loopitem": "impl1",
      "loopindex": 0
    })
    
    ~~SubStep1: [print:  ]
    hello
    --Step2:
    self: final context exec vars:
    
    (*core.Cache)({
      "loopindex": 0,
      "loopindex1": 1,
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 1,
      "loopitem": "impl1"
    })
    
    ~~SubStep1: [sleep:  ]
    sleeping 1000 milli seconds
    ..........
    =Task3: [task ==> impl2:  ]
    --Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "loopitem": "impl2",
      "loopindex": 1,
      "loopindex1": 2,
      "last_result": (*utils.ExecResult)({
        Cmd: "echo 'hello'",
        Code: 0,
        Output: "hello",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 1
    })
    
    ~~SubStep1: [print:  ]
    world
    
Logs with different verbose level
Raw logs with different verbose level