Skip to content

Commit ad44d4f

Browse files
fix: FIT-1316: don't leak CurrentContext across RQ jobs (#9304)
Co-authored-by: matt-bernstein <matt-bernstein@users.noreply.github.com>
1 parent e6f1c7f commit ad44d4f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

label_studio/core/redis.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,10 @@ def start_job_async_or_sync(job, *args, in_seconds=0, **kwargs):
189189
try:
190190
context_data = _capture_context()
191191

192-
if context_data:
193-
meta = kwargs.get('meta', {})
194-
# Store context data in job meta for worker access
195-
meta.update(context_data)
196-
kwargs['meta'] = meta
192+
meta = kwargs.get('meta', {})
193+
# Store context data in job meta for worker access
194+
meta.update(context_data)
195+
kwargs['meta'] = meta
197196
except Exception:
198197
logger.info(f'Failed to capture context for job {job.__name__} on queue {queue_name}')
199198

0 commit comments

Comments
 (0)