Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Add a signal to notify when the teosd.py/TeosDaemon is done with bootstrapping #214

Open
bigspider opened this issue Sep 10, 2020 · 1 comment · May be fixed by #276
Open

Add a signal to notify when the teosd.py/TeosDaemon is done with bootstrapping #214

bigspider opened this issue Sep 10, 2020 · 1 comment · May be fixed by #276
Milestone

Comments

@bigspider
Copy link
Collaborator

Currently, there is no way of knowing when the TeosDaemon is fully initialized and ready once start is called, therefore the e2e tests just wait for a timeout, which occasionally led to failures like this when the timeout is too short: https://app.circleci.com/pipelines/github/talaia-labs/python-teos/789/workflows/7301bb92-7e0b-4e64-ae1d-bccaef33f89c/jobs/1096

Adding an Event argument to the main() method and to the TeosDaemon constructor would allow for a more reliable synchronization mechanism.
A similar method could be used for all other processes as long as they are run via multiprocessing.Process.

@bigspider bigspider added this to the v0.1.1 milestone Sep 10, 2020
@bigspider bigspider self-assigned this Sep 10, 2020
@bigspider
Copy link
Collaborator Author

I tried to do some work in the 214-bootstrap-signal branch; it's easy to do it using an Event for processes that we create with multiprocessing.Process, but I didn't manage to use a simple method to synchronize with subprocesses created in other ways, like the api process created with gunicorn using popen. I tried to create a pipe using os.pipe, but getting an OSError: [Errno 9] Bad file descriptor when I tried to open it in the child process.

Leaving it for now to work on other issues.

@bigspider bigspider removed their assignment Sep 11, 2020
@sr-gi sr-gi modified the milestones: v0.1.1, v0.2.0 Sep 14, 2020
@sr-gi sr-gi linked a pull request Mar 15, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants