Opened 6 years ago

Last modified 5 weeks ago

#30213 new New feature

Add support for a "watchdog" based autoreloader

Reported by: Tom Forbes Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: Petr Přikryl, Carlton Gibson, Adam Johnson, Ülgen Sarıkavak, Ahmed Ibrahim Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It was suggested on the mailing list (https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/django-developers/Y3caNikdM6M/BYpsr0qLBAAJ) that an alternative reloader might be useful on Linux based systems.

I propose adding support for Watchdog (https://github.com/gorakhargosh/watchdog) which will give us improved reloading performance on Linux and potentially Windows as well.

Change History (8)

comment:1 by Claude Paroz, 6 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Petr Přikryl, 4 years ago

Cc: Petr Přikryl added

comment:4 by Carlton Gibson, 2 years ago

Cc: Carlton Gibson Adam Johnson added

Adam recently put together a proof-of-concept for a Watchfiles based reloader. See https://github.com/adamchainz/django-watchfiles

(All these reloaders... it's quite complex 🤯).

Watchfiles is based on the Rust Notify crate, which had good cross-platform support. Arguably it would be the way to go.

Given how many options there are in this field, I wonder if we'd not be better served making get_reloader() properly pluggable, rather than adding (an ever growing set of) specific reloaders? 🤔

comment:5 by Carlton Gibson <carlton@…>, 2 years ago

In e34dfad:

Refs #30213 -- Removed post-startup check for Watchman availability.

This is checked at startup in get_reloader(). The runtime check ties
the implementation to Watchman excessively.

comment:6 by Ülgen Sarıkavak, 8 months ago

Cc: Ülgen Sarıkavak added

comment:7 by Ahmed Ibrahim, 5 weeks ago

We have a ticket (I'm the assignee) for using watchman, afaik, this one is no longer relevant

comment:8 by Ahmed Ibrahim, 5 weeks ago

Cc: Ahmed Ibrahim added
Note: See TracTickets for help on using tickets.
Back to Top