Changeset 6525


Ignore:
Timestamp:
Jun 14, 2010, 9:29:37 AM (14 years ago)
Author:
ronosman
Message:

Fix destination_category issue : move the property in the manager to avoid thread data copy.

Location:
extensions/pLoader/trunk/src/Uploader
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/Image.pm

    r6426 r6525  
    3838    exif_metadata
    3939    add_rank
    40     site_categories
    4140    site_tags
    4241    image_id
  • extensions/pLoader/trunk/src/Uploader/Images.pm

    r6426 r6525  
    102102                site_author       => $self->author,
    103103                add_rank          => $i,
    104                 site_categories   => [],
    105104                site_tags         => [],
    106105                site_high_file    => $file->{ANSIPathName},
  • extensions/pLoader/trunk/src/Uploader/TransferManager.pm

    r6522 r6525  
    99__PACKAGE__->mk_accessors(qw/
    1010    pwg
     11    destination_category
    1112/);
    12 
     13use Data::Dumper;
    1314
    1415sub new_worker {
     
    2324
    2425
    25 sub destination_category {
    26     my ( $self, $category ) = @_;
    27 
    28     $self->worker->destination_category($category);
    29 }
    30 
    31 
    3226sub destination_category_is_empty {
    3327    my ( $self ) = @_;
    3428
    35     $self->worker->destination_category_is_empty;
     29    !scalar @{$self->destination_category};
    3630}
    3731
    38 
    39321;
  • extensions/pLoader/trunk/src/Uploader/TransferWorker.pm

    r6522 r6525  
    1111__PACKAGE__->mk_accessors(qw/
    1212    preferences
    13     destination_category
    1413    pwg
    1514    event_handler
     
    2221    my ( $self ) =@_;
    2322
    24     $self->destination_category([]);
    2523    $self->pwg->log_progress_cbk(
    2624        sub { $self->post_image_progress_event(@_) }
     
    165163sub update_image {
    166164    my ( $self, $image ) = @_;
    167 
     165print Dumper $image;
    168166    $self->log_image_progress($image, "updating", 0);
    169167
     
    225223
    226224
    227 sub destination_category_is_empty {
    228     my ( $self ) = @_;
    229 
    230     !scalar @{$self->destination_category};
    231 }
    232225
    233226
Note: See TracChangeset for help on using the changeset viewer.