add starting delay when proc start#137
Conversation
|
Thank you. Could you please explain this use-case? |
|
|
||
| .idea | ||
| .git | ||
| .cover |
|
For example: I have three services in the Procfile, A, B, and C The same situation also occurs when procStop(). In stateful services, the order of startup and shutdown is often the opposite. |
|
Do not modify color table. |
|
hey i think delay is a good idea and should go in. The other way to do this is to us the "wait-for" pattern that waits on a tcp ip based process. https://github.com/roerohan/wait-for-it
dep:
# https://github.com/roerohan/wait-for-it
go install github.com/roerohan/wait-for-it@latest
test-0:
wait-for-it google.com:80 -- echo "It works\!"
test-1:
wait-for-it -w google.com:80 -w localhost:27017 -t 30 -- echo "Waiting for 30 seconds for google.com:80 and localhost:27017"
https://github.com/atkrad/wait4x is another one
|
sleep N sec AT startProcs() . because sometimes, dependencies checking between stateful services (procs) will let it starting fail .