|
|
|
@ -377,7 +377,7 @@ sub run_jobs |
|
|
|
|
my $job_status = $hash_ref->{job_status}; |
|
|
|
|
my $started_seconds_ago = $job_picked_up_at ? (time - $job_picked_up_at) : 0; |
|
|
|
|
my $updated_seconds_ago = $job_updated ? (time - $job_updated) : 0; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
|
job_uuid => $job_uuid, |
|
|
|
|
job_command => $job_command, |
|
|
|
|
job_data => $job_data, |
|
|
|
@ -396,7 +396,7 @@ sub run_jobs |
|
|
|
|
if ($job_progress ne "100") |
|
|
|
|
{ |
|
|
|
|
$anvil->data->{sys}{jobs_running} = 1; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { "sys::jobs_running" => $anvil->data->{sys}{jobs_running} }}); |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "sys::jobs_running" => $anvil->data->{sys}{jobs_running} }}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# See if the job was picked up by a now-dead instance. |
|
|
|
@ -423,7 +423,7 @@ sub run_jobs |
|
|
|
|
# Clear some variables. |
|
|
|
|
$job_progress = 0; |
|
|
|
|
$job_status = "message_0056"; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
|
job_progress => $job_progress, |
|
|
|
|
job_status => $job_status, |
|
|
|
|
}}); |
|
|
|
@ -431,7 +431,7 @@ sub run_jobs |
|
|
|
|
|
|
|
|
|
# Clear the PID |
|
|
|
|
$job_picked_up_by = 0; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { job_picked_up_by => $job_picked_up_by }}); |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { job_picked_up_by => $job_picked_up_by }}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -489,6 +489,7 @@ sub run_jobs |
|
|
|
|
# Start the job, appending '--job-uuid' to the command. |
|
|
|
|
my $command = $job_command." --job-uuid ".$job_uuid; |
|
|
|
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, secure => 0, key => "log_0210", variables => { command => $command }}); |
|
|
|
|
die; |
|
|
|
|
$anvil->data->{jobs}{handles}{$job_uuid} = $anvil->System->call({ |
|
|
|
|
background => 1, |
|
|
|
|
stdout_file => "/tmp/anvil.job.".$job_uuid.".stdout", |
|
|
|
|