Commit eebfd141 authored by Francesc Guasch's avatar Francesc Guasch Committed by Francesc Guasch
Browse files

[#314] list domain requests pending

parent fa56b265
......@@ -1486,6 +1486,27 @@ Returns all the drivers if not passwed
sub get_driver {}
=head2 list_requests
Returns a list of pending requests from the domain
sub list_requests {
my $self = shift;
my $sth = $$CONNECTOR->dbh->prepare(
"SELECT * FROM requests WHERE id_domain = ? AND status ne 'done'"
my @list;
while ( my $req_data = $sth->fetchrow_hashref ) {
push @list,($req_data);
return scalar @list if !wantarray;
return map { Ravada::Request->open($_->{id}) } @list;
sub _dbh {
my $self = shift;
_init_connector() if !$CONNECTOR || !$$CONNECTOR;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment