2 # Copyright (C) 2016 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
6 use PublicInbox::WatchMaildir;
7 use PublicInbox::Config;
8 my ($config, $watch_md);
10 $config = PublicInbox::Config->new;
11 $watch_md = PublicInbox::WatchMaildir->new($config);
15 my $scan = sub { $watch_md->scan if $watch_md };
18 $SIG{ALRM} = sub { $SIG{ALRM} = 'DEFAULT'; $scan->() };