Changeset 1fe514e4f263a663bdf9d40db5bfb9e6c2534eaa in xas-spooler


Ignore:
Timestamp:
11/03/15 14:33:56 (4 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
cd267643a706fc823f4192cf5614208bf5bf33c2
Parents:
678c1467201d3d1e5a3574c5468ea7a8e2298d2e
git-author:
Kevin L. Esteb <kevin@…> (11/03/15 14:33:56)
git-committer:
Kevin L. Esteb <kevin@…> (11/03/15 14:33:56)
Message:

Formatting changes

Location:
trunk/lib/XAS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/XAS/Apps/Spooler/Process.pm

    r6872e8ca659e79210354178cc7e8fea7569dd1fe r1fe514e4f263a663bdf9d40db5bfb9e6c2534eaa  
    7878    my $self = shift; 
    7979 
    80     $self->{host} = $self->env->mqserver; 
    81     $self->{port} = $self->env->mqport; 
     80    $self->{'host'} = $self->env->mqserver; 
     81    $self->{'port'} = $self->env->mqport; 
    8282 
    8383    return { 
    84         'host=s' => \$self->{host}, 
    85         'port=s' => \$self->{port} 
     84        'host=s' => \$self->{'host'}, 
     85        'port=s' => \$self->{'port'} 
    8686    }; 
    8787 
  • trunk/lib/XAS/Spooler/Connector.pm

    r308a37ed1119409c29f9c20cdb1062f848525c72 r1fe514e4f263a663bdf9d40db5bfb9e6c2534eaa  
    140140    my $self = $class->SUPER::init(@_); 
    141141 
    142     unless (defined($self->{hostname})) { 
    143  
    144         $self->{hostname} = $self->env->host; 
     142    unless (defined($self->{'hostname'})) { 
     143 
     144        $self->{'hostname'} = $self->env->host; 
    145145 
    146146    } 
    147147 
    148     $self->{events} = XAS::Lib::POE::PubSub->new(); 
     148    $self->{'events'} = XAS::Lib::POE::PubSub->new(); 
    149149 
    150150    return $self; 
  • trunk/lib/XAS/Spooler/Processor.pm

    r678c1467201d3d1e5a3574c5468ea7a8e2298d2e r1fe514e4f263a663bdf9d40db5bfb9e6c2534eaa  
    4242    try { 
    4343 
    44         $self->{files} = (); 
     44        $self->{'files'} = (); 
    4545 
    4646        if (my $dh = $self->spooldir->open) { 
     
    7979            if ($temp->path =~ /$pattern/) { 
    8080 
    81                 push(@{$self->{files}}, $temp); 
     81                push(@{$self->{'files'}}, $temp); 
    8282 
    8383            } 
     
    162162    $self->log->debug("$alias: entering process_files()"); 
    163163 
    164     $self->{count} -= 1; 
    165     $self->{count} = 1 if ($self->{count} < 0); 
    166  
    167     $self->log->debug("$alias: task count: " . $self->{count}); 
     164    $self->{'count'} -= 1; 
     165    $self->{'count'} = 1 if ($self->{'count'} < 0); 
     166 
     167    $self->log->debug("$alias: task count: " . $self->{'count'}); 
    168168 
    169169    try { 
    170170 
    171         if (my $file = shift(@{$self->{files}})) { 
     171        if (my $file = shift(@{$self->{'files'}})) { 
    172172 
    173173            if ($file->exists) { 
     
    234234        $self->log->warn("$alias: resume processing"); 
    235235 
    236         $self->{cron} = POE::Component::Cron->from_cron( 
     236        $self->{'cron'} = POE::Component::Cron->from_cron( 
    237237            $self->schedule => $alias => 'scan' 
    238238        ); 
     
    274274    } 
    275275 
    276     $self->{spooldir} = $dir; 
    277     $self->{spooler} = XAS::Factory->module( 
     276    $self->{'spooldir'} = $dir; 
     277    $self->{'spooler'} = XAS::Factory->module( 
    278278        spool => { 
    279279            -lock      => $self->queue, 
     
    317317    $self->log->debug("$alias: task count: " . $self->{count}); 
    318318 
    319     if ($self->{count} <= $self->tasks) { 
    320  
    321         $self->{count} += 1; 
     319    if ($self->{'count'} <= $self->tasks) { 
     320 
     321        $self->{'count'} += 1; 
    322322        $poe_kernel->post($alias, 'process_files'); 
    323323 
     
    340340 
    341341    $self->paused(1); 
    342     $self->{files} = (); 
     342    $self->{'files'} = (); 
    343343    $poe_kernel->alarm_remove_all(); 
    344344 
     
    365365 
    366366    $self->paused(0); 
    367     $self->{cron} = POE::Component::Cron->from_cron( 
     367    $self->{'cron'} = POE::Component::Cron->from_cron( 
    368368        $self->schedule => $alias => 'scan' 
    369369    ); 
     
    409409    my $self = $class->SUPER::init(@_); 
    410410 
    411     $self->{count}  = 1; 
    412     $self->{events} = XAS::Lib::POE::PubSub->new(); 
     411    $self->{'count'}  = 1; 
     412    $self->{'events'} = XAS::Lib::POE::PubSub->new(); 
    413413 
    414414    return $self; 
Note: See TracChangeset for help on using the changeset viewer.