Files
AutoGPT/autogpt_platform/backend
Zamil Majdy 200e5814b3 fix(backend): Cleanup service on service closure (#9735)
The cleanup command was only called on SIGTERM, making it possible for
the service to close without being cleaned. Risking the connection not
being proactively closed when the service is unused.

### Changes 🏗️

Call the cleanup command on the service finally block.

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Run the service, stop it, see the log is printed (locally)
2025-04-02 04:21:40 +00:00
..