Commit 89dab7a
authored
Close existing connection before job execution in worker (#1959)
* Close existing DB connection before job execution in worker
The tech stack of django-rq seems to have issues with TLS connections getting corrupted when using the Worker class, which uses fork. This is relevant when an external database is used. This problem can be avoided by closing the existing connection prior to the call to `execute_job`. For reference see: #1523 and rq/django-rq#650
Signed-off-by: Robert Guetzkow <robert.guetzkow@betasystems.com>
* Move ScanCodeIOWorker modification for TLS connection issues to dedicated class
The current default is kept and the new worker class with the workaround can be enabled through the `--worker-class` option of rqworker, if needed
Signed-off-by: Robert Guetzkow <robert.guetzkow@betasystems.com>
---------
Signed-off-by: Robert Guetzkow <robert.guetzkow@betasystems.com>1 parent 77cd6e0 commit 89dab7a
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
57 | 72 | | |
58 | 73 | | |
59 | 74 | | |
| |||
0 commit comments