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

docker stop時に安全に止める #19

Open
sushichan044 opened this issue Oct 18, 2023 · 1 comment
Open

docker stop時に安全に止める #19

sushichan044 opened this issue Oct 18, 2023 · 1 comment

Comments

@sushichan044
Copy link
Member

今後リマインダーなどの機能を実装した際おそらく外部にデータを置くので、docker stopする際に安全に止める必要がある

  • docker stopSIGTERMを送る。そのあと10s待ってSIGKILLを送る(この秒数はコマンド引数で変更可能)
  • Botクラスにはすでにshutdown()関数がある
  • SIGTERMを受け取るハンドラを追加する
@sushichan044
Copy link
Member Author

Botみたいなイベントループ駆動のアプリケーションでsignal.signalが正しく動くのかわからん

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

No branches or pull requests

1 participant