- Added a wait timeout parameter to the WAITING method, so that Spectre
doesn't have to check something that the workflow activity knows it will have to wait on for a while. - Added --stop and --start aliases to spectre.pl.
This commit is contained in:
parent
7349633d63
commit
bc5fd3c727
21 changed files with 89 additions and 44 deletions
|
|
@ -82,7 +82,8 @@ sub execute {
|
|||
my $versionTag = shift;
|
||||
my $session = $self->session;
|
||||
my $urlOfSingleAsset = "";
|
||||
|
||||
$session->log->warn('a');
|
||||
|
||||
#By default, we'll make it so that things happen now.
|
||||
my $time = $session->datetime->time();
|
||||
|
||||
|
|
@ -93,19 +94,25 @@ sub execute {
|
|||
elsif ($self->get("type") eq "endTime") {
|
||||
$time = $versionTag->get("endTime");
|
||||
}
|
||||
$session->log->warn('b');
|
||||
|
||||
#Turn start or end time into an epoch value
|
||||
my $dt = WebGUI::DateTime->new($session,$time);
|
||||
$session->log->warn('c');
|
||||
|
||||
#Get the current UTC time
|
||||
my $now = WebGUI::DateTime->new($session,$session->datetime->time());
|
||||
$session->log->warn('d');
|
||||
|
||||
#Workflow is complete if the time has passed.
|
||||
if($now->epoch >= $dt->epoch) {
|
||||
return $self->COMPLETE;
|
||||
}
|
||||
|
||||
return $self->WAITING;
|
||||
$session->log->warn('e');
|
||||
$session->log->warn($dt->epoch - $now->epoch);
|
||||
|
||||
return $self->WAITING($dt->epoch - $now->epoch);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue