bug fixes

This commit is contained in:
Oliver Gorwits
2013-01-02 12:28:56 +00:00
parent 61a3542834
commit 9e1bc7d6d7
2 changed files with 4 additions and 27 deletions

View File

@@ -39,7 +39,7 @@ sub worker_body {
# get all pending jobs
my $rs = schema('netdisco')->resultset('Admin')
->search({wid => 0});
->search({status => 'queued'});
while (1) {
while (my $job = $rs->next) {
@@ -64,7 +64,7 @@ sub worker_body {
# TODO also check for stale jobs in Netdisco DB
interruptible_sleep( setting('daemon_sleep_time') || 5 );
sleep( setting('daemon_sleep_time') || 5 );
}
}