Skip to content

Conversation

seeker-jie
Copy link

Reason for change

Problem: RQ_QUEUES was hardcoded to an empty dictionary {} in label_studio/core/settings/label_studio.py, preventing Redis Queue
configuration via environment variables and breaking background job processing.

Solution: Changed RQ_QUEUES = {} to RQ_QUEUES = json.loads(get_env("RQ_QUEUES", "{}")) to enable environment variable
configuration while maintaining backward compatibility.

Rollout strategy

This change uses an existing environment variable pattern (get_env) and maintains backward compatibility with empty dict default. No
feature flags required - the change is safe to deploy immediately.

Testing

Manual verification:

  • Verified RQ_QUEUES defaults to {} when RQ_QUEUES environment variable is not set
  • Verified RQ_QUEUES correctly parses JSON configuration from RQ_QUEUES environment variable
  • Tested that existing deployments without the env var continue working unchanged

Unit tests: Not required for this change as it's a simple Django settings configuration modification. Existing RQ functionality tests
will verify the configuration works correctly.

Risks

Low risk:

  • Backward compatible change - existing deployments unaffected
  • Uses established get_env pattern consistent with other settings in the same file
  • JSON parsing could theoretically fail with malformed input, but this follows the same pattern as other env var configurations

Reviewer notes

General notes

This fix enables proper Redis Queue configuration for production deployments where Redis might be running on different hosts/ports or
require authentication, while maintaining the current behavior for existing installations.

Fixes #8455

Copy link

netlify bot commented Sep 17, 2025

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 99022fe

Copy link

netlify bot commented Sep 17, 2025

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 99022fe

Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 99022fe
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/68ca551f3e7f840008d4b8cc

Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 99022fe
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/68ca551ff7764f0008093b5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] RQ_QUEUES configuration ignores environment variables and defaults to empty dict
1 participant