Add reset command before each regeneration demand

This commit is contained in:
nemunaire 2014-01-20 05:52:25 +01:00
parent 68e2014502
commit dee5b5fbb7

View File

@ -132,7 +132,7 @@ for my $f (readdir $dh)
$sth = query($dbh, "SELECT S.id FROM solved S WHERE S.id_exercice = ".$dbh->quote($exercice)); $sth = query($dbh, "SELECT S.id FROM solved S WHERE S.id_exercice = ".$dbh->quote($exercice));
if (! $sth->rows) if (! $sth->rows)
{ {
say "TEAM$team,$theme:SYNCSYN:TEAM$team:SYNC:HOME:SYNC:all:DS"; say "resetresetreset:TEAM$team,$theme:SYNCSYN:TEAM$team:SYNC:HOME:SYNC:all:DS";
say STDERR localtime().": Team $team solve exercice $exercice in $theme"; say STDERR localtime().": Team $team solve exercice $exercice in $theme";
query($dbh, "INSERT INTO solved (id_team, id_exercice, time) VALUES ($team, ".$dbh->quote($exercice).", CURRENT_TIMESTAMP);"); query($dbh, "INSERT INTO solved (id_team, id_exercice, time) VALUES ($team, ".$dbh->quote($exercice).", CURRENT_TIMESTAMP);");
@ -151,7 +151,7 @@ for my $f (readdir $dh)
} }
} }
else { else {
say "TEAM$team,$theme:SYNCSYN"; say "resetresetreset:TEAM$team,$theme:SYNCSYN";
say STDERR localtime().": Team $team didn't give the correct answer for exercice $exercice."; say STDERR localtime().": Team $team didn't give the correct answer for exercice $exercice.";
} }