Fixed workflow checks on spectre so that workflows only error if they are a non realtime or failed realtime and spectre is down.
This commit is contained in:
parent
20460192a6
commit
7e368c329c
3 changed files with 10 additions and 12 deletions
|
|
@ -307,13 +307,6 @@ sub www_commitVersionTag {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
my $tagId = $session->form->param("tagId");
|
my $tagId = $session->form->param("tagId");
|
||||||
|
|
||||||
my $spectreTest = WebGUI::Operation::Spectre::spectreTest($session);
|
|
||||||
if($spectreTest ne "success"){
|
|
||||||
my $i18n = WebGUI::International->new($session, "Macro_SpectreCheck")->get($spectreTest);
|
|
||||||
my $ac = WebGUI::AdminConsole->new($session,"versions");
|
|
||||||
return $ac->render( $i18n );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !$tagId ) {
|
if ( !$tagId ) {
|
||||||
return www_manageVersions( $session );
|
return www_manageVersions( $session );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -408,8 +408,6 @@ fails.
|
||||||
sub requestCommit {
|
sub requestCommit {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
return "Failure" if(WebGUI::Operation::Spectre::spectreTest($self->session) ne "success");
|
|
||||||
|
|
||||||
$self->lock;
|
$self->lock;
|
||||||
my $instance = WebGUI::Workflow::Instance->create($self->session, {
|
my $instance = WebGUI::Workflow::Instance->create($self->session, {
|
||||||
workflowId=>$self->get("workflowId"),
|
workflowId=>$self->get("workflowId"),
|
||||||
|
|
@ -420,7 +418,7 @@ sub requestCommit {
|
||||||
$self->{_data}{committedBy} = $self->session->user->userId;
|
$self->{_data}{committedBy} = $self->session->user->userId;
|
||||||
$self->{_data}{workflowInstanceId} = $instance->getId;
|
$self->{_data}{workflowInstanceId} = $instance->getId;
|
||||||
$self->session->db->setRow("assetVersionTag","tagId",$self->{_data});
|
$self->session->db->setRow("assetVersionTag","tagId",$self->{_data});
|
||||||
$instance->start;
|
return $instance->start;
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ use JSON;
|
||||||
use WebGUI::Pluggable;
|
use WebGUI::Pluggable;
|
||||||
use WebGUI::Workflow::Spectre;
|
use WebGUI::Workflow::Spectre;
|
||||||
use WebGUI::Workflow;
|
use WebGUI::Workflow;
|
||||||
|
use WebGUI::International;
|
||||||
|
use WebGUI::Operation::Spectre;
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
Package WebGUI::Workflow::Instance
|
Package WebGUI::Workflow::Instance
|
||||||
|
|
@ -527,6 +527,13 @@ sub start {
|
||||||
$log->info('Could not complete workflow instance '.$self->getId.' in realtime, handing off to Spectre.');
|
$log->info('Could not complete workflow instance '.$self->getId.' in realtime, handing off to Spectre.');
|
||||||
my $spectre = WebGUI::Workflow::Spectre->new($self->session);
|
my $spectre = WebGUI::Workflow::Spectre->new($self->session);
|
||||||
$spectre->notify("workflow/addInstance", {cookieName=>$self->session->config->getCookieName, gateway=>$self->session->config->get("gateway"), sitename=>$self->session->config->get("sitename")->[0], instanceId=>$self->getId, priority=>$self->{_data}{priority}});
|
$spectre->notify("workflow/addInstance", {cookieName=>$self->session->config->getCookieName, gateway=>$self->session->config->get("gateway"), sitename=>$self->session->config->get("sitename")->[0], instanceId=>$self->getId, priority=>$self->{_data}{priority}});
|
||||||
|
|
||||||
|
my $spectreTest = WebGUI::Operation::Spectre::spectreTest($self->session);
|
||||||
|
if($spectreTest ne "success"){
|
||||||
|
return WebGUI::International->new($self->session, "Macro_SpectreCheck")->get($spectreTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue