runabol / piper

piper - a distributed workflow engine
Apache License 2.0
489 stars 87 forks source link

Parallel task handler is executing tasks sequentially #30

Closed omartrigui closed 5 years ago

omartrigui commented 5 years ago

As the title describe, the second command's output date is always greater than the first commmand's

Pipeline code :

label: Transcode 

inputs:
  - name: input
    label: Input File
    type: string
    required: true

tasks: 

- type: parallel
  tasks:

    - type: bash
      label: First executed command
      script: sleep 10; date

    - type: bash
      label: Second executed command
      script: date

Job description :

{
    "outputs": {},
    "execution": [
        {
            "jobId": "635d3f8490664d2b8cadd1eb434cd09c",
            "createTime": "2019-01-27T20:17:23.757+0000",
            "startTime": "2019-01-27T20:17:23.824+0000",
            "taskNumber": 1,
            "id": "2a22422dfdde49dfbad12e5985bebcea",
            "type": "parallel",
            "priority": 0,
            "tasks": [
                {
                    "label": "First executed command",
                    "type": "bash",
                    "script": "sleep 10; date"
                },
                {
                    "label": "Second executed command",
                    "type": "bash",
                    "script": "date"
                }
            ],
            "status": "COMPLETED"
        },
        {
            "label": "First executed command",
            "type": "bash",
            "priority": 0,
            "script": "sleep 10; date",
            "parentId": "2a22422dfdde49dfbad12e5985bebcea",
            "output": "Sun Jan 27 20:17:33 UTC 2019\n",
            "executionTime": 10008,
            "jobId": "635d3f8490664d2b8cadd1eb434cd09c",
            "createTime": "2019-01-27T20:17:23.795+0000",
            "progress": 100,
            "startTime": "2019-01-27T20:17:23.801+0000",
            "id": "3fe36d3f85f74513b0ad80f2ab377ed0",
            "endTime": "2019-01-27T20:17:33.808+0000",
            "status": "COMPLETED"
        },
        {
            "label": "Second executed command",
            "type": "bash",
            "priority": 0,
            "script": "date",
            "parentId": "2a22422dfdde49dfbad12e5985bebcea",
            "output": "Sun Jan 27 20:17:33 UTC 2019\n",
            "executionTime": 5,
            "jobId": "635d3f8490664d2b8cadd1eb434cd09c",
            "createTime": "2019-01-27T20:17:23.798+0000",
            "progress": 100,
            "startTime": "2019-01-27T20:17:33.810+0000",
            "id": "0d5e03f8e3dc44269f90e58a1595e697",
            "endTime": "2019-01-27T20:17:33.815+0000",
            "status": "COMPLETED"
        }
    ],
    "inputs": {
        "input": "lol"
    },
    "currentTask": -1,
    "label": "Transcode",
    "priority": 0,
    "pipelineId": "video/transcode",
    "tags": [],
    "createTime": "2019-01-27T20:17:23.620+0000",
    "webhooks": [],
    "startTime": "2019-01-27T20:17:23.750+0000",
    "id": "635d3f8490664d2b8cadd1eb434cd09c",
    "endTime": "2019-01-27T20:17:33.843+0000",
    "status": "COMPLETED"
}