Skip to content
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

Make daemon loop over coordinator connection to make it possible to create a system service awaiting coordinator connection #689

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

haixuanTao
Copy link
Collaborator

@haixuanTao haixuanTao commented Oct 12, 2024

Loop over trying to connect to the coordinator on first connection to make it possible to await the coordinator to be ready.

This notably will make it possible to make dora daemon a system service which can

sudo tee /etc/systemd/system/dora-daemon.service << EOF
[Unit]
Description=Dora Daemon in Conda Environment
After=network.target

[Service]
Environment="PATH=$PATH"
User=HwHiAiUser
WorkingDirectory=/home/HwHiAiUser
ExecStart=/bin/bash --login  -c 'source /home/HwHiAiUser/.bashrc && source $CONDA_PATH/bin/activate base && dora daemon'
Restart=always
RestartSec=3
StartLimitInterval=60
StartLimitBurst=3

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable dora-daemon.service
sudo systemctl start dora-daemon.service

… make it possible to await the coordinator to be ready
@haixuanTao haixuanTao merged commit 4f70121 into main Oct 13, 2024
40 checks passed
@haixuanTao haixuanTao deleted the daemon-wait-for-coordinator-for-registration branch October 13, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant