more workflow bugfixes
This commit is contained in:
parent
19e4da7a92
commit
bf1a0ad11e
6 changed files with 18 additions and 5 deletions
|
|
@ -26,7 +26,14 @@
|
|||
# it gets suspended. It can get suspended if it's waiting for
|
||||
# external input, or if it errors for any reason.
|
||||
|
||||
"suspensionDelay" : 60
|
||||
"suspensionDelay" : 60,
|
||||
|
||||
# What port should we connect to WebGUI on? If you've configured
|
||||
# WebGUI yourself, then this should probably be 80. If you're using
|
||||
# the WebGUI Runtime Environment, 81 might be a better choice to go
|
||||
# directly at the mod_perl server.
|
||||
|
||||
"webguiPort" : 80
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ sub checkSchedule {
|
|||
});
|
||||
if (defined $instance) {
|
||||
$self->debug("Created workflow instance ".$instance->getId.".");
|
||||
$kernel->post($self->workflowSession, "addInstance", {instanceId=>$instance->getId, priority=>$job->{priority}, sitename=>});
|
||||
$kernel->post($self->workflowSession, "addInstance", {instanceId=>$instance->getId, priority=>$job->{priority}, sitename=>$job->{sitename}});
|
||||
} else {
|
||||
$self->debug("Something bad happened. Couldn't create workflow instance for schedule ".$job->{taskId}." for ".$job->{config}.".");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ sub runWorker {
|
|||
my ($kernel, $self, $instance, $session) = @_[KERNEL, OBJECT, ARG0, SESSION];
|
||||
$self->debug("Preparing to run workflow instance ".$instance->{instanceId}.".");
|
||||
POE::Component::Client::UserAgent->new;
|
||||
my $url = "http://".$instance->{sitename}.'/';
|
||||
my $url = "http://".$instance->{sitename}.':'.$self->config->get("webguiPort").'/';
|
||||
my $request = POST $url, [op=>"runWorkflow", instanceId=>$instance->{instanceId}];
|
||||
my $cookie = $self->{_cookies}{$instance->{sitename}};
|
||||
$request->header("Cookie","wgSession=".$cookie) if (defined $cookie);
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ sub retrieve {
|
|||
return undef unless $data->{messageId};
|
||||
$session->db->deleteRow("mailQueue","messageId", $messageId);
|
||||
my $parser = MIME::Parser->new;
|
||||
$parser->output_to_core(1);
|
||||
bless {_session=>$session, _message=>$parser->parse_data($data->{messageId}), _toGroup=>$data->{toGroup}}, $class;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -356,7 +356,11 @@ Checks to ensure the requestor is who we think it is, and then executes a workfl
|
|||
sub www_runWorkflow {
|
||||
my $session = shift;
|
||||
$session->http->setMimeType("text/plain");
|
||||
return "error" unless (isInSubnet($session->env->get("REMOTE_ADDR"), $session->config->get("spectreSubnets")));
|
||||
unless (isInSubnet($session->env->get("REMOTE_ADDR"), $session->config->get("spectreSubnets"))) {
|
||||
$session->errorHandler->security("make a Spectre workflow runner request, but we're only allowed to
|
||||
accept requests from ".join(",",@{$session->config->get("spectreSubnets")}).".");
|
||||
return "error";
|
||||
}
|
||||
my $instanceId = $session->form->param("instanceId");
|
||||
if ($instanceId) {
|
||||
my $instance = WebGUI::Workflow::Instance->new($session, $instanceId);
|
||||
|
|
@ -365,6 +369,7 @@ sub www_runWorkflow {
|
|||
}
|
||||
return "complete";
|
||||
}
|
||||
$session->errorHandler->warn("No instance ID passed to workflow runner.");
|
||||
return "error";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ sub execute {
|
|||
if ($versionTag->getAssetCount) {
|
||||
# if there's only one asset in the tag, we might as well give them a direct link to it
|
||||
my $asset = $versionTag->getAssets->[0];
|
||||
$urlOfSingleAsset = "\n\n".$self->session->getSiteURL().$asset->getUrl("func=view;revision=".$asset->get("revisionDate"));
|
||||
$urlOfSingleAsset = "\n\n".$self->session->url->getSiteURL().$asset->getUrl("func=view;revision=".$asset->get("revisionDate"));
|
||||
}
|
||||
my $properties = {
|
||||
status=>"completed",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue