-
Notifications
You must be signed in to change notification settings - Fork 0
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
layers/meta-opentrons: app uses sd_notify #63
Conversation
Environment=@@application-environment@@ | ||
ExecStart=/usr/bin/opentrons-robot-app.sh | ||
RestartSec=1 | ||
TimeoutStartSec=30 |
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.
is this enough startup time?
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.
don't really know, honestly. i'll be messing with it to verify.
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 it is!
It is now a notify service.
03c04fe
to
34e4098
Compare
sd-notify is a utility for a program to communicate back to the systemd process manager that started it. It can be used in a variety of ways; the one that is most critical is to positively assert that it has started OK. Since this is a function call you can make any time you want to, this lets your program define when it has "started" on its own terms. The app, especially on the ODD, takes a long time to start - chrome takes a long time to start, and then we load up all our stuff. Currently, systemd considers us "started" as soon as the shell script that invokes chrome exits, which is long before anything useful is rendered. By making ourselves a notify service (in Opentrons/oe-core#63) and putting the notify at the time we receive the first ipc message, which indicates that the frontend is up, we can delay that "ready" status until we're actually rendering. This can then be used as a criterion in systemd to take down a loading screen. Closes RCORE-683
It is now a notify service.
Don't merge before Opentrons/opentrons#12266