Script to update bonsai cache

This commit is contained in:
johnkeis 2003-02-03 03:39:13 +00:00
parent 7fc17199ef
commit 3e3e389dbc
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/usr/bin/perl -wT -I.
use strict;
use Tinderbox3::DB;
use Tinderbox3::Bonsai;
use DBI;
my $dbh = get_dbh();
my $sth = $dbh->prepare("SELECT bonsai_id, bonsai_url, module, branch, directory, cvsroot, EXTRACT(EPOCH FROM start_cache), EXTRACT(EPOCH FROM end_cache) FROM tbox_bonsai");
$sth->execute();
while (my $row = $sth->fetchrow_arrayref) {
#Tinderbox3::Bonsai::clear_cache($dbh, $row->[0]);
Tinderbox3::Bonsai::update_cache($dbh, time - (60*60*24*2), time, $row->[0],
$row->[1], $row->[2], $row->[3], $row->[4],
$row->[5], $row->[6], $row->[7]);
}
$dbh->commit();
$dbh->disconnect();

View File

@ -0,0 +1,20 @@
#!/usr/bin/perl -wT -I.
use strict;
use Tinderbox3::DB;
use Tinderbox3::Bonsai;
use DBI;
my $dbh = get_dbh();
my $sth = $dbh->prepare("SELECT bonsai_id, bonsai_url, module, branch, directory, cvsroot, EXTRACT(EPOCH FROM start_cache), EXTRACT(EPOCH FROM end_cache) FROM tbox_bonsai");
$sth->execute();
while (my $row = $sth->fetchrow_arrayref) {
#Tinderbox3::Bonsai::clear_cache($dbh, $row->[0]);
Tinderbox3::Bonsai::update_cache($dbh, time - (60*60*24*2), time, $row->[0],
$row->[1], $row->[2], $row->[3], $row->[4],
$row->[5], $row->[6], $row->[7]);
}
$dbh->commit();
$dbh->disconnect();