Skip to content

Commit

Permalink
Print to STDERR, instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jun 2, 2005
1 parent e183c0d commit 8caf2dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Bric/Util/Job.pm
Expand Up @@ -1784,8 +1784,9 @@ sub execute_me {
throw_gen({ error => "Cannot execute job that has already been executed."})
if $self->get_comp_time;

# Get a lock on the job.
$set_executing->($self, 1);
# Get a lock on the job or just return (because another process is likely
# executing the job).
$set_executing->($self, 1) or return;

# Do it!
eval {
Expand Down Expand Up @@ -2197,9 +2198,10 @@ $set_executing = sub {
die $err;
}

# Throw an exception if we couldn't get a lock.
# Output a warning if we couldn't get a lock.
if ($ret eq '0E0') {
throw_dp error => "Can't get a lock on job No. ". $self->get_id . '.';
print STDERR "Can't get a lock on job No. ". $self->get_id . ".\n";
return;
}

# Set the new number of tries and the executing attribute and return.
Expand Down

0 comments on commit 8caf2dd

Please sign in to comment.