Skip to content
Snippets Groups Projects
Commit e04af84f authored by Leo Gordon's avatar Leo Gordon
Browse files

worker_say() now reports job_id automatically, no need to pass it around

parent 1a69a768
No related branches found
No related tags found
No related merge requests found
......@@ -193,12 +193,10 @@ sub enter_status {
$job->set_and_update_status( $status );
my $status_msg = 'Job '.$job->dbID.' : '.$status;
if(my $worker = $self->worker) {
$worker->enter_status( $status, $status_msg );
$worker->enter_status( $status );
} elsif($self->debug) {
print STDERR "Standalone$status_msg\n";
print STDERR "StandaloneJob : $status\n";
}
}
......
......@@ -377,8 +377,11 @@ sub worker_say {
my $worker_id = $self->dbID();
my $current_role = $self->current_role;
my $job_id = $self->runnable_object && $self->runnable_object->input_job && $self->runnable_object->input_job->dbID;
print "Worker $worker_id [ ". ( $current_role
? ('Role '.$current_role->dbID.' , '.$current_role->analysis->logic_name.'('.$current_role->analysis_id.')')
? ('Role '.$current_role->dbID.' , '.$current_role->analysis->logic_name.'('.$current_role->analysis_id.')'
. ($job_id ? ", Job $job_id" : '')
)
: 'UNSPECIALIZED'
)." ] $msg\n";
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment