- Simplified Spectre's initial data load, and reduced memory footprint in the
process.
This commit is contained in:
parent
f140fdead4
commit
b19bf14389
8 changed files with 159 additions and 73 deletions
|
|
@ -122,6 +122,26 @@ sub get {
|
|||
return $self->{_data}{$name};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getAllTasks ( session )
|
||||
|
||||
Returns an array reference of all the schedule objects defined in this system. A class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub getAllTasks {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my @schedules = ();
|
||||
my $rs = $session->db->read("SELECT taskId FROM WorkflowSchedule");
|
||||
while (my ($taskId) = $rs->array) {
|
||||
push(@schedules, WebGUI::Workflow::Cron->new($session, $taskId));
|
||||
}
|
||||
return \@schedules;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getId ( )
|
||||
|
|
|
|||
|
|
@ -142,6 +142,27 @@ sub get {
|
|||
return $self->{_data}{$name};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getAllInstances ( session )
|
||||
|
||||
Returns an array reference of all the instance objects defined in this system. A class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub getAllInstances {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my @instances = ();
|
||||
my $rs = $session->db->read("SELECT instanceId FROM WorkflowInstance");
|
||||
while (my ($instanceId) = $rs->array) {
|
||||
push(@instances, WebGUI::Workflow::Instance->new($session, $instanceId));
|
||||
}
|
||||
return \@instances;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getId ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue