Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awaitable task is not listed in verdi process list #260

Open
agoscinski opened this issue Aug 22, 2024 · 2 comments
Open

Awaitable task is not listed in verdi process list #260

agoscinski opened this issue Aug 22, 2024 · 2 comments

Comments

@agoscinski
Copy link
Contributor

The code

import asyncio

@task.awaitable()
async def some_sleep():
    await asyncio.sleep(10)
    return orm.Int(0)
    
@task.calcfunction
def some():
    return orm.Int(0)
wg = WorkGraph()

some_sleep_task = wg.add_task(some_sleep, name='some_sleep_task')
some_task = wg.add_task(some, name='some_task')

wg.run()

Gives me first the output

2496  2s ago     WorkGraph<WorkGraph>                                        ⏵ Waiting         Waiting for child processes: some_sleep_task
2497  0s ago     some                                                        ⏹ Finished [0]

Then when everything is finished

2496  13s ago    WorkGraph<WorkGraph>Finished [0]
2497  12s ago    someFinished [0]

I am missing the some_sleep_task

@superstar54
Copy link
Member

Yes, only AiiDA processes are listed. The following tasks have a process:

  • calcfunction
  • workfunction
  • calcjob
  • workchain
  • workgraph
  • graph_builder who generate a workgraph

Other tasks will not:

  • normal task created with @task()
  • awaitable
  • monitor
  • while and if

@superstar54
Copy link
Member

But you can still visualize the state of the non-AiiDA process tasks in the GUI using web app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants