Open Sheraff opened 1 year ago
Kill websocket server on signals: https://github.com/Sheraff/soft-serve-tunes/commit/2233551371794c60e83edb94a35fea7bf6f26cd5
Disconnect prisma client on signals: https://github.com/Sheraff/soft-serve-tunes/commit/7f74bf0898e1cd202d4abde559bfac73cb0fad81
to verify: I think some tasks might be non-recoverable if interrupted. For example, fetching a track on Spotify is supposed to then fetch the album and artist and won't ever do so if interrupted after the track.
If there are cases like this, we should listen for sigint or other termination signals and store some recoverable state in database before exiting.