mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Script to update bonsai cache
This commit is contained in:
parent
7fc17199ef
commit
3e3e389dbc
20
webtools/tinderbox3/scripts/tbox_bonsai_update.pl
Executable file
20
webtools/tinderbox3/scripts/tbox_bonsai_update.pl
Executable 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();
|
||||
|
20
webtools/tinderbox3/server/tbox_bonsai_update.pl
Executable file
20
webtools/tinderbox3/server/tbox_bonsai_update.pl
Executable 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();
|
||||
|
Loading…
Reference in New Issue
Block a user