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

Add option to make submit call blocking #125

Open
finkandreas opened this issue Sep 17, 2024 · 0 comments
Open

Add option to make submit call blocking #125

finkandreas opened this issue Sep 17, 2024 · 0 comments

Comments

@finkandreas
Copy link

I find myself often doing something like

jobSubmit = client.submit(...)
while client.poll_active(machine, [jobSubmit['jobid']])[0]['state'] != 'PENDING': 
    time.sleep(3)

Often it does not make sense to continue with anything, until the job actually has started on the remote side, hence the constant polling until the job has started (or failed to start).

It could make sense to make already the call client.submit(..., wait_for_start=True) blocking. Especially in the async interface this could be used.

Then pyfirecrest can decide what a sensible sleeping time is, instead of the user having a too tight sleeping between polling for the job status.

In my usecase I really only want to wait until job start, but maybe some other usecases want to submit and wait until the job finishes. So another idea could be wait_until=f7t.state.RUNNING and wait_until=f7t.state.FINISHED, with the default being wait_until=f7t.state.QUEUED.

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

1 participant