[Collab-qa-commits] r572 - svnbuildstat/trunk/script
goneri-guest at alioth.debian.org
goneri-guest at alioth.debian.org
Wed Dec 12 16:57:58 UTC 2007
Author: goneri-guest
Date: 2007-12-12 16:57:58 +0000 (Wed, 12 Dec 2007)
New Revision: 572
Added:
svnbuildstat/trunk/script/svnbuildstat_watchfile.pl
Log:
initial import
Added: svnbuildstat/trunk/script/svnbuildstat_watchfile.pl
===================================================================
--- svnbuildstat/trunk/script/svnbuildstat_watchfile.pl (rev 0)
+++ svnbuildstat/trunk/script/svnbuildstat_watchfile.pl 2007-12-12 16:57:58 UTC (rev 572)
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+use lib '/home/sites/svnbuildstat.debian.net/svnbuildstat/lib';
+
+use Config::IniFiles;
+use SvnBuildStat::Schema;
+use SvnBuildStat::Common;
+use Logger::Syslog;
+
+my $cfg = Config::IniFiles->new( -file => "../svnbuildstat.ini" ) or die "Can't load config file";
+my $schema = SvnBuildStat::Schema->connect(
+ $cfg->val('db', 'dsn'),
+ $cfg->val('db', 'user'),
+ $cfg->val('db', 'password'),
+ {AutoCommit => 1, debug => 1}
+);
+
+my $begin = time;
+debug ("begin");
+
+my $interval = "< NOW() - interval '6 hour'";
+my $repositoryentry_rs = $schema->resultset('Repositoryentry')->search(
+ { -or => [ lastwatchcheck => { '='=> undef}, lastwatchcheck => \$interval]
+ });
+while (my $repositoryentry = $repositoryentry_rs->next) {
+ checkRepositoryentryWatchfile(\$repositoryentry);
+
+}
+
+debug ("end (".(time - $begin)." secondes)");
+
Property changes on: svnbuildstat/trunk/script/svnbuildstat_watchfile.pl
___________________________________________________________________
Name: svn:executable
+ *
More information about the Collab-qa-commits
mailing list