Bug 39190: Start of recording status updates from abort
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
752ab95313
commit
b701fed04c
|
|
@ -287,16 +287,18 @@ sub _abort_operation {
|
|||
my $stderr = $self->{stderr_capture};
|
||||
$self->{stderr_capture} = '';
|
||||
|
||||
my $payload = {
|
||||
status => $self->{connection}->status,
|
||||
error => $self->{connection}->error,
|
||||
path => $path ? $path : $self->{connection}->cwd,
|
||||
error_raw => $stderr
|
||||
};
|
||||
|
||||
$self->add_message(
|
||||
{
|
||||
message => $operation,
|
||||
type => 'error',
|
||||
payload => {
|
||||
status => $self->{connection}->status,
|
||||
error => $self->{connection}->error,
|
||||
path => $path ? $path : $self->{connection}->cwd,
|
||||
error_raw => $stderr
|
||||
}
|
||||
payload => $payload
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -304,6 +306,12 @@ sub _abort_operation {
|
|||
$self->{connection}->abort;
|
||||
}
|
||||
|
||||
my $status = {
|
||||
status => 'errors',
|
||||
operations => [ { code => $operation, status => 'error', detail => $payload } ]
|
||||
};
|
||||
$self->set( { status => encode_json($status) } )->store();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue