vatlab/sos-notebook

GUI for refreshing status and kill all tasks

BoPeng opened this issue · 2 comments

During the development of tasks, we sometimes need to refresh and get the status of all tasks (in a cell), especially when the tasks are executed on remote hosts that update status quite scarcely. We also need a method to kill all tasks if the tasks were submitted by mistake.

It seems nature to add to the workflow execution status panel two buttons for this purpose, but many times tasks can be executed interactively (not with %sos or %sosrun) so some GUI for that would be needed as well, unless we create a such a "master" status bar for interactive task execution as well.

image

It is currently designed like this. Basically tags are displayed with the tasks (#155) and one of the tags would be workflow ID. When the tags are hovered, three tag-related task operations will be triggered in the side panel, something like %task status --tags tag, which will get the status of all tasks with given tag, and refresh the frontend. The purge option will remove all tasks, although I am not sure if there is a need for a clear option that only clears tasks from the notebook, not from the system.

Note that all notebook triggered (not by %sosrun etc) tasks will have step name scratch_0 as one of the tags, so working on scratch_0 can affect all tasks, not limited to the current cell. This can be dangerous, or a useful feature if used correctly.

This is WIP because only the refresh button works, kill and purge will come soon.

image

for consistency and adding the ability to purge individual task, I have removed the "hover" behavior of the status icon and add four icons to individual tasks. So all task related operations are handled by the %task magic consistently.

image