Skip to content

Commit

Permalink
Handle SIGTERM (#834)
Browse files Browse the repository at this point in the history
There is an OOM happening on Cloud Run but we don't capture anything in Sentry. I believe it's because [Cloud Run sends us `SIGTERM`](https://cloud.google.com/run/docs/container-contract#instance-shutdown) and we don't handle it.
  • Loading branch information
fkorotkov authored Feb 5, 2025
1 parent 851c0b5 commit 9d85601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/cirrus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"os"
"os/signal"
"strings"
"syscall"
"time"
)

Expand Down Expand Up @@ -67,7 +68,7 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())

interruptCh := make(chan os.Signal, 1)
signal.Notify(interruptCh, os.Interrupt)
signal.Notify(interruptCh, syscall.SIGINT, syscall.SIGTERM)

go func() {
select {
Expand Down

0 comments on commit 9d85601

Please sign in to comment.