mmbros / taskengine-app

Demo app to show mmbros/taskengine package usage
0 stars 0 forks source link

View the workers' execution of the tasks #1

Closed mmbros closed 2 years ago

mmbros commented 2 years ago

Add a sub-command to show the timeline of the workers executions of the tasks.

The sub-command can start a web server that read the .json files of a folder.

Each .json file must contains an events variable that is an array of json event representation. Each json event must contains the following properties:

All the properties are mandatory, except the label.

Example:

{
  events: [
    {
      worker_id: "w1",
      worker_inst: 1,
      task_id: "t12",
      status: "success",
      time_start: "2022-04-14T13:00:01.625Z",
      time_end: "2022-04-14T14:00:01.625Z",
      label: "my result",
    },
  ]
}

The json data will be display in a browser with in SVG image with the D3js library , like so:

worker_id1[worker_inst1]: |  task 1 |    task 2   |
worker_id1[worker_inst2]: |  task 4     |  
worker_id2[worker_inst1]: |  task 2                  |

The position and length of the task rectangles will be in proportion to the start-end time of the event. The color of the task must reflect the status.

mmbros commented 2 years ago

See app server sub command