Ignore:
Timestamp:
11/28/10 14:59:48 (14 years ago)
Author:
nanardon
Message:
  • add dump/load distrib config using Yaml
  • separate DB connection for session
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Base/RpmsPath.pm

    r39 r42  
    1515    my ($class, $pathkey) = @_; 
    1616 
    17     bless(\$pathkey, $class); 
    18 } 
     17    bless({ key => $pathkey }, $class); 
     18} 
     19 
     20sub key { $_[0]->{key} } 
    1921 
    2022sub path { 
     
    2426        q{select path from d_path where d_path_key = ?} 
    2527    ); 
    26     $sth->execute($$self); 
     28    $sth->execute($self->key); 
    2729    my $res = $sth->fetchrow_hashref; 
    2830    $sth->finish; 
     
    3638        q{select * from rpmfiles where d_path = ?} 
    3739    ); 
    38     $sth->execute($$self); 
     40    $sth->execute($self->key); 
    3941    $sth->fetchall_hashref([ 'filename' ]); 
    4042} 
     
    101103    $self->db->prepare_cached(q{ 
    102104        update d_path set updated = now() where d_path_key = ? 
    103         })->execute($$self); 
     105        })->execute($self->key); 
    104106    $self->db->commit; 
    105107} 
     
    114116    ); 
    115117    for (1 .. 3) { 
    116         if ($remove->execute($$self, $rpm)) {  
     118        if ($remove->execute($self->key, $rpm)) {  
    117119            warn "deleting $rpm"; 
    118120            $self->db->commit; 
     
    135137                } 
    136138            ); 
    137             if ($register->execute($$self, $rpm, $pkgid)) { 
     139            if ($register->execute($self->key, $rpm, $pkgid)) { 
    138140                warn "adding $rpm"; 
    139141                $self->db->commit; 
Note: See TracChangeset for help on using the changeset viewer.