-
Notifications
You must be signed in to change notification settings - Fork 4
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
Wait for yagna apis to be listening before starting agents #335
Conversation
Strange, it did not seem to work on the first run... needs more investigation i guess |
Re-run worked fine, i'm going to prioritze other PRs |
It seems like current |
55cd59d
to
038c154
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move waiting for logs to AgentMixin
since it's shared between the two agent classes.
"""Start the requestor agent and attach to its log stream.""" | ||
|
||
self._logger.info("Waiting for yagna apis to be listening...") | ||
await self.container.logs.wait_for_entry( | ||
"Starting .* service on .*.", timeout=300 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timeout here is different from the one in provider agent. Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the requestor is requesting funds, while the provider is not
self._logger.info("Waiting for yagna apis to be listening...") | ||
await self.container.logs.wait_for_entry( | ||
"Starting .* service on .*.", timeout=10 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is copy-pasted between the two agents, maybe it's better to push it into their base class (i.e. AgentMixin
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only differences are the timeout and the name of the starting binary, so can do :)
Co-authored-by: Kuba Mazurek <[email protected]>
From a test run yesterday in
requestor_agent.log
:Fixed!