Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread lock when setting constance attributes while using signals #442

Open
ArujReis opened this issue Feb 18, 2021 · 0 comments
Open

Thread lock when setting constance attributes while using signals #442

ArujReis opened this issue Feb 18, 2021 · 0 comments

Comments

@ArujReis
Copy link

Describe the problem

When accessing Constance attributes during the handling of a signal spawned by setting a Constance attribute, the app gets thread-locked.

Steps to reproduce

  1. Set Constance to use in-memory DB
  2. Create Constance config with attr_1 and attr_2
  3. Create a receiver for the config_updated Constance event.
    1. In the receiver, access attr_2.
  4. Change attr_1 in code, for example, in a test. (config.attr_1='test')
  5. The app will hang because of a double call to self.lock in the memory backend.

System configuration

  • Django version: 2.2.18
  • Python version: 3.7.5
  • Django-Constance version: 2.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant