You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
For runtime jobs, job.result() checks whether the job completed or not, and keeps polling the API if it is not completed yet.
This is inefficient though, causing many requests to the API and flooding logs repetitively. In the case of a runtime job, they can run for a lot longer than the usual circuits jobs. So this polling can go on for a while.
It is possible to use the /stream endpoint which is a websocket server. If the job is still running, the websocket server will keep the stream open. Once the job has completed, the websocket server will terminate the connection. It's not possible to open a stream if the job is completed already. So if there are network errors, the client can retry connecting to the websocket until it sees the message Job is not running... along with a 302 status.
The text was updated successfully, but these errors were encountered:
On Sep 28, 2021, at 8:09 PM, Jessie Yu ***@***.***> wrote:
@renier Does this work for programs that don't provide interim results? I guess the stream would just be left open with no data transmission?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
What is the expected enhancement?
For runtime jobs, job.result() checks whether the job completed or not, and keeps polling the API if it is not completed yet.
This is inefficient though, causing many requests to the API and flooding logs repetitively. In the case of a runtime job, they can run for a lot longer than the usual circuits jobs. So this polling can go on for a while.
It is possible to use the
/stream
endpoint which is a websocket server. If the job is still running, the websocket server will keep the stream open. Once the job has completed, the websocket server will terminate the connection. It's not possible to open a stream if the job is completed already. So if there are network errors, the client can retry connecting to the websocket until it sees the messageJob is not running...
along with a302
status.The text was updated successfully, but these errors were encountered: