#!/usr/bin/env python
from torii import Torii

t = Torii(container='new')

def create_workflow():

    name = 'picom operator'
    version = '0.1'
    picom = t.picoms.get(name=name, version=version, take_first=True)

    task = t.tasks.new(name='DSW', picom=picom)
    task.submit()

#    task.open_viewer()
#    task.wait(status=['SUBMITTING', 'SCHEDULING', 'RUNNING'], timeout=30)

    task.open_container_mapper()


if __name__ == '__main__':
    create_workflow()

