Skip image checking capturing==Ondemand
This commit is contained in:
parent
72d2b99ca4
commit
509cecf9f5
|
@ -85,20 +85,22 @@ my $sth = $dbh->prepare_cached($sql)
|
||||||
or Fatal("Can't prepare '$sql': ".$dbh->errstr());
|
or Fatal("Can't prepare '$sql': ".$dbh->errstr());
|
||||||
|
|
||||||
while (!$zm_terminate) {
|
while (!$zm_terminate) {
|
||||||
while ( ! ( $dbh and $dbh->ping() ) ) {
|
while (!($dbh and $dbh->ping())) {
|
||||||
if ( ! ( $dbh = zmDbConnect() ) ) {
|
if (!($dbh = zmDbConnect())) {
|
||||||
sleep($Config{ZM_WATCH_CHECK_INTERVAL});
|
sleep($Config{ZM_WATCH_CHECK_INTERVAL});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $res = $sth->execute( $Config{ZM_SERVER_ID} ? $Config{ZM_SERVER_ID} : () )
|
my $res = $sth->execute($Config{ZM_SERVER_ID} ? $Config{ZM_SERVER_ID} : ())
|
||||||
or Fatal('Can\'t execute: '.$sth->errstr());
|
or Fatal('Can\'t execute: '.$sth->errstr());
|
||||||
while( my $monitor = $sth->fetchrow_hashref() ) {
|
while (my $monitor = $sth->fetchrow_hashref()) {
|
||||||
next if $monitor->{Function} eq 'None';
|
next if $monitor->{Function} eq 'None';
|
||||||
next if $monitor->{Type} eq 'WebSite';
|
next if $monitor->{Type} eq 'WebSite';
|
||||||
my $now = time();
|
my $now = time();
|
||||||
my $restart = 0;
|
my $restart = 0;
|
||||||
if (zmMemVerify($monitor)) {
|
if (zmMemVerify($monitor)) {
|
||||||
|
next if $monitor->{Capturing} eq 'Ondemand';
|
||||||
|
|
||||||
# Check we have got an image recently
|
# Check we have got an image recently
|
||||||
my $capture_time = zmGetLastWriteTime($monitor);
|
my $capture_time = zmGetLastWriteTime($monitor);
|
||||||
if (!defined($capture_time)) {
|
if (!defined($capture_time)) {
|
||||||
|
|
Loading…
Reference in New Issue