Merge commit 'v7.10.17' into 8
Conflicts: docs/upgrades/upgrade_7.9.13-7.10.0.pl lib/WebGUI.pm lib/WebGUI/Asset/Template/TemplateToolkit.pm lib/WebGUI/Asset/Wobject/AssetReport.pm lib/WebGUI/Asset/Wobject/Thingy.pm lib/WebGUI/Form/Captcha.pm lib/WebGUI/Macro/AdminBar.pm lib/WebGUI/Shop/Cart.pm lib/WebGUI/Shop/PayDriver.pm lib/WebGUI/Shop/PayDriver/PayPal/ExpressCheckout.pm lib/WebGUI/Shop/PayDriver/PayPal/PayPalStd.pm lib/WebGUI/Shop/Transaction.pm lib/WebGUI/Workflow/Instance.pm lib/WebGUI/Workflow/Spectre.pm lib/WebGUI/i18n/English/PayDriver.pm t/Asset/Asset.t t/Asset/AssetExportHtml.t t/Asset/AssetLineage.t t/Asset/Wobject/Thingy.t
This commit is contained in:
commit
795d88e7e5
69 changed files with 972 additions and 170 deletions
|
|
@ -676,14 +676,9 @@ sub start {
|
|||
# hand off the workflow 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);
|
||||
$spectre->notify("workflow/addInstance", {cookieName=>$self->session->config->getCookieName, gateway=>$self->session->request->base->path, sitename=>$self->session->config->get("sitename")->[0], instanceId=>$self->getId, priority=>$self->{_data}{priority}});
|
||||
my $success = $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;
|
||||
return $success ? undef : 'Could not connect to spectre';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ These methods are available from this class:
|
|||
|
||||
=head2 notify ( module, params )
|
||||
|
||||
Sends a message to Spectre.
|
||||
Sends a message to Spectre. Returns true iff the message was successfully
|
||||
sent.
|
||||
|
||||
=head3 module
|
||||
|
||||
|
|
@ -65,15 +66,13 @@ sub notify {
|
|||
timeout=>10
|
||||
);
|
||||
if (defined $remote) {
|
||||
my $result = $remote->post($module, $params);
|
||||
unless (defined $result) {
|
||||
$log->warn("Couldn't send command to Spectre because ".$POE::Component::IKC::ClientLite::error);
|
||||
}
|
||||
$remote->disconnect;
|
||||
undef $remote;
|
||||
my $result = $remote->post($module, $params);
|
||||
return 1 if defined $result;
|
||||
$log->warn("Couldn't send command to Spectre because ".$POE::Component::IKC::ClientLite::error);
|
||||
} else {
|
||||
$log->warn("Couldn't connect to Spectre because ".$POE::Component::IKC::ClientLite::error);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue