Commit 010ba62
committed
[connection] Fix update_config task incorrectly detecting itself as duplicate #1204
The _is_update_in_progress function was incorrectly returning True when
the only active task was the current task itself, causing the worker to
skip execution thinking another worker was handling it.
Fixed by:
- Adding current_task_id parameter to _is_update_in_progress()
- Using bind=True on update_config task to access self.request.id
- Excluding the current task when checking for active duplicates
- Added unit tests to verify the fix
Fixes #12041 parent e881eba commit 010ba62
2 files changed
+8
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
| |||
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 133 | + | |
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
| |||
161 | 157 | | |
162 | 158 | | |
163 | 159 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 160 | + | |
167 | 161 | | |
168 | 162 | | |
169 | 163 | | |
| |||
185 | 179 | | |
186 | 180 | | |
187 | 181 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 182 | + | |
191 | 183 | | |
192 | 184 | | |
193 | 185 | | |
| |||
0 commit comments