@@ -334,17 +343,12 @@ sub check_for_dead_workers { # a bit counter-intuitively only looks for curre
}
}
sub worker_check_in{
my($self,$worker)=@_;
returnunless($worker);
my$sql="UPDATE worker SET last_check_in=CURRENT_TIMESTAMP";
$sql.=" ,work_done='".$worker->work_done."'";
$sql.=" WHERE worker_id='".$worker->dbID."'";
# a new version that both checks in and updates the status
sub check_in_worker{
my($self,$worker)=@_;
my$sth=$self->prepare($sql);
$sth->execute();
$sth->finish;
$self->dbc->do("UPDATE worker SET last_check_in=CURRENT_TIMESTAMP, status='".$worker->status."', work_done='".$worker->work_done."' WHERE worker_id='".$worker->dbID."'");
}
...
...
@@ -527,10 +531,10 @@ sub synchronize_AnalysisStats {
and$self->analysis->stats->adaptor->decrease_running_workers_on_hive_overload($self->analysis->dbID)# careful with order, this operation has side-effect
my$max_retry_count=$self->analysis->stats->max_retry_count();# a constant (as the Worker is already specialized by the Queen) needed later for retrying jobs