From 46807fff962319f8aef134076c57b2d638fb7ecd Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 20 Oct 2005 16:04:18 +0000 Subject: [PATCH] Bug 186 - Made filter execution interval configurable git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1532 e3e1d417-86f3-4887-817a-d78f3d33393f --- scripts/zmfilter.pl.z | 3 +-- zmconfig.pl.in | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/zmfilter.pl.z b/scripts/zmfilter.pl.z index 56012a1bf..ee71d3dc3 100755 --- a/scripts/zmfilter.pl.z +++ b/scripts/zmfilter.pl.z @@ -76,7 +76,6 @@ BEGIN use constant EVENT_PATH => ZM_PATH_WEB.'/'.ZM_DIR_EVENTS; use constant LOG_FILE => ZM_PATH_LOGS.'/zmfilter.log'; use constant START_DELAY => 5; # How long to wait before starting -use constant CHECK_DELAY => 60; # How long between each event check use constant DBG_LEVEL => 0; # 0 is errors, warnings and info only, > 0 for debug @@ -148,7 +147,7 @@ $ENV{PATH} = '/bin:/usr/bin'; $ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL}; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; -my $delay = CHECK_DELAY; +my $delay = ZM_FILTER_EXECUTE_INTERVAL; my $event_id = 0; sub Usage diff --git a/zmconfig.pl.in b/zmconfig.pl.in index 5406d038b..fd80c9406 100755 --- a/zmconfig.pl.in +++ b/zmconfig.pl.in @@ -746,7 +746,15 @@ my @options = name => "ZM_FILTER_RELOAD_DELAY", default => "300", description => "How often (in seconds) filters are reloaded in zmfilter.pl", - help => "ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be deleted or uploaded to a remote machine. The zmfilter daemon loads these and does the deleting or uploading. This option determine how often the filters are reloaded to get the latest versions of the filters. If you don't change filters very often this can be quite large.", + help => "ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be deleted or uploaded to a remote machine. The zmfilter daemon loads these and does the deleting or uploading. This option determines how often the filters are reloaded from the database to get the latest versions or new filters. If you don't change filters very often this value can be set to a large value.", + type => $types{integer}, + category => 'system', + }, + { + name => "ZM_FILTER_EXECUTE_INTERVAL", + default => "60", + description => "How often (in seconds) to run automatic saved filters", + help => "ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be deleted or uploaded to a remote machine. The zmfilter daemon loads these and does the deleting or uploading. This option determines how often the filters are executed on the saved event in the database. If you want a rapid response to new events this should be a small value, however this may increase the overall load on the system", type => $types{integer}, category => 'system', },