Wez Furlong 6ead93f4e9 watchman: reap idle watches after 5 days
Summary:
adds `idle_reap_age_seconds` to .watchmanconfig and the global
configuration.  It defaults to 5 days.

A watch is considered to be idle when it has had no filesystem
notifications or commands that operate on it for idle_reap_age_seconds.
If an idle watch has no triggers and no subscriptions then it will be
cancelled, releasing the associated operating system resources, and
removed from the state file.

This is pretty straightforward in terms of implementation.  I suspect
the most difficult thing will be on agreeing to a decent value for
the global default.

I picked 5 days to allow for the reasonably common case where someone
might be idle over a weekend and busy for the first couple of days in
a week before they pick up where they left off.

I suspect that the Ember folks would prefer to use a smaller value by
default, so that their large number of discrete watches can be pruned
more aggressively.  I believe that desire will be largely mitigated once
ember has migrated to use `watch-project`.

Refs: https://github.com/facebook/watchman/issues/63

Test Plan:
`make integration`.

`tests/integration/test_age_watch.py` asserts that we won't reap while triggers or subscriptions are registered.

I also manually tested this with a 300 second
limit on a temporary dir and verified that the state file is correctly updated.

Reviewers: sid0

Reviewed By: sid0

Subscribers: stefanpenner

Differential Revision: https://reviews.facebook.net/D37701
2015-08-02 23:41:19 -07:00
2015-07-11 14:57:13 -07:00
2015-06-11 12:06:57 -07:00
2015-06-03 11:19:59 -07:00
2015-06-26 22:03:53 -07:00
2015-06-26 22:03:53 -07:00
2015-06-26 22:03:53 -07:00
2013-01-05 12:33:07 -08:00
2015-08-02 08:16:40 -07:00
2014-11-29 09:01:32 -08:00
2014-01-07 17:05:58 -08:00
2015-08-01 14:58:04 -07:00
2014-05-10 18:08:02 -07:00
2012-11-29 17:48:14 -08:00
2015-07-26 12:32:41 -07:00
2015-06-03 11:19:59 -07:00
2015-08-02 11:09:54 -07:00
2015-05-05 10:39:48 -07:00
2015-06-25 15:11:43 -07:00
2014-05-10 18:08:02 -07:00

Watchman

A file watching service.

Purpose

Watchman exists to watch files and record when they actually change. It can also trigger actions (such as rebuilding assets) when matching files change.

Documentation

Head on over to https://facebook.github.io/watchman/

Build Status

Build Status

License

Watchman is made available under the terms of the Apache License 2.0. See the LICENSE file that accompanies this distribution for the full text of the license.

S
Description
Watches files and records, or triggers actions, when they change.
Readme
1.8 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 55.7%
PHP 21.6%
JavaScript 10.7%
Python 6.1%
Ruby 2.1%
Other 3.8%