question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make watchman settings importable

See original GitHub issue

The django-debug-toolbar had a fix a few years ago to make it “import safe” https://github.com/jazzband/django-debug-toolbar/issues/801

This basically changed up the settings so that anything calling getenv wasn’t called directly at the time. This is useful to be able to import the default attributes and configuration from a local settings

For instance this doesn’t seem to be possible in (local) settings.py

collectstatic/django will either exception out about SECRET_KEY or even if this is imported after SECRET_KEY is defined then the locally defined WATCHMAN_CHECKS aren’t set.

from watchman import settings as wm_settings

. . .

WATCHMAN_CHECKS = wm_settings.DEFAULT_CHECKS + ('dashboard.common.watchman.custom_checks.check_crontab', )

I think either the “constant’s” could be moved to a separate constants file or the fix similar to the fix for 801 could be used. The workaround is just to redefine the the full set of DEFAULT_CHECKS locally but those “might” change in a future version and then would automatically update!

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mwarkentincommented, Mar 19, 2019

I’ve pushed django-watchman 0.16.0 to pypi… hope that helps!

1reaction
mirceaciucommented, Mar 19, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

django-watchman - PyPI
You can also import the watchman.constants to include the DEFAULT_CHECKS and PAID_CHECKS in your settings.py: from watchman import constants as ...
Read more >
django-watchman 0.15.0 documentation
Add watchman to your INSTALLED_APPS setting like this: ... You can also import the watchman.constants to include the DEFAULT_CHECKS and PAID_CHECKS in your ......
Read more >
Setting up the Watchman Monitoring Integration - Hudu Support
Matching companies. Hudu's import works in two stages. First, Hudu will look for companies to match in to Hudu. We will attempt to...
Read more >
django-watchman Documentation - Read the Docs
You can also import the watchman.constants to include the DEFAULT_CHECKS and PAID_CHECKS in your settings.py: from watchman import constants ...
Read more >
Installation | Watchman - Meta Open Source
Installation. System Requirements. Watchman is known to compile and pass its test suite on: Linux systems with inotify; macOS (uses FSEvents on 10.7+, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found