Skip to content

Commit

Permalink
[backend] auto-update configuration from time to time
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 24, 2015
1 parent c56bc21 commit 5856df6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/backend/BSStdServer.pm
Expand Up @@ -32,7 +32,7 @@ use BSVerify;
use BSServerEvents;
use BSXML;
use BSUtil;
use BSConfig;
use BSConfiguration;
use XML::Structured;

use strict;
Expand Down Expand Up @@ -98,6 +98,8 @@ sub dispatch {
BSDispatch::dispatch($conf, $req);
}

my $configurationcheck = 0;

sub periodic {
my ($conf) = @_;
if (-e "$rundir/$conf->{'name'}.exit") {
Expand Down Expand Up @@ -126,6 +128,10 @@ sub periodic {
exec($0, '--restart', $arg);
die("$0: $!\n");
}
if ($configurationcheck++ > 10) {
BSConfiguration::check_configuration();
$configurationcheck = 0;
}
}

sub periodic_ajax {
Expand Down

0 comments on commit 5856df6

Please sign in to comment.