Commit 1ab6e3d
authored
fix(celery): Close the connection we're reading driver_type from (#5427)
Currently, we're reading the driver type (e.g. `redis`) from a
connection. We're however not closing the connection, potentially
causing file descriptor leaks.
**Aside:** Opening a connection just for the purpose of determining the
driver type is not ideal in the first place. We should see whether we
can get the info from elsewhere from the context of a task's
`run`/`__call__` (which is where we're enriching the span with it). Or
we could see whether we can cache this somehow.
For now, let's at least make sure to clean up the connection.
#### Issues
Closes #5422
#### Reminders
- Please add tests to validate your changes, and lint your code using
`tox -e linters`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)1 parent 3373da2 commit 1ab6e3d
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| |||
0 commit comments