Ignore:
Timestamp:
05/17/12 09:58:27 (12 years ago)
Author:
nanardon
Message:
  • add task module to validate automated request
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm

    r959 r983  
    423423} 
    424424 
     425sub list_auto_pending_requests { 
     426    my ($self) = @_; 
     427 
     428    my $sth = $self->db->prepare(q{ 
     429        select id from request 
     430        where done is null 
     431            and apply < now() 
     432            and automated = true 
     433        order by apply 
     434    }); 
     435    $sth->execute; 
     436    my @ids; 
     437    while (my $res = $sth->fetchrow_hashref) { 
     438        push(@ids, $res->{id}); 
     439    } 
     440 
     441    @ids 
     442} 
     443 
    4254441; 
    426445 
Note: See TracChangeset for help on using the changeset viewer.