Changeset 5338
- Timestamp:
- Oct 14, 2005, 2:03:47 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-MetaDB/lib/PS/IPP/MetaDB.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-MetaDB/lib/PS/IPP/MetaDB.pm
r5337 r5338 1 1 # Copyright (C) 2005 Joshua Hoblitt 2 2 # 3 # $Id: MetaDB.pm,v 1.1 1 2005-10-14 23:47:46jhoblitt Exp $3 # $Id: MetaDB.pm,v 1.12 2005-10-15 00:03:47 jhoblitt Exp $ 4 4 5 5 package PS::IPP::MetaDB; … … 118 118 my %p = @_; 119 119 120 $class->search(120 my $new = PS::IPP::MetaDB::Image::New->search( 121 121 exp_id => $p{exp_id}, 122 class => $p{class}, 122 123 class_id => $p{class_id}, 123 )->delete_all; 124 125 $class->create({ 126 exp_id => $p{exp_id}, 127 class_id => $p{class_id}, 124 ); 125 126 PS::IPP::MetaDB::Image::NotifyReceived->create({ 127 file_id => $new->file_id, 128 }); 129 130 PS::IPP::MetaDB::Image::Newed->create({ 131 exp_id => $new->exp_id, 132 class => $new->class, 133 class_id => $new->class_id, 128 134 url => $p{url}, 129 135 }); 136 137 $new->delete; 130 138 } 131 139 … … 222 230 } 223 231 232 =item * notify_received 233 234 This is a queue of pending file received notifications that need to be send to 235 OTIS. Once a notification is successfully sent to OTIS the entry is removed 236 from this queue. 237 238 =over 4 239 240 =item * file_id 241 242 OTIS's ID string for the file, i.e. it's filename. 243 244 =back 245 246 =cut 247 248 package PS::IPP::MetaDB::Image::NotifyReceived; 249 250 use base qw( PS::IPP::MetaDB ); 251 252 __PACKAGE__->register_init(\&init); 253 254 sub init 255 { 256 __PACKAGE__->table("notify_received"); 257 __PACKAGE__->create_table(q{ 258 file_id BIGINT NOT NULL PRIMARY KEY, 259 }); 260 __PACKAGE__->set_up_table; 261 } 262 224 263 =item * metadata_new 225 264 … … 483 522 exposure ID #, keyed on the C<exposure_component> table. 484 523 524 =item * class 525 526 The 'type' of data this is. 527 485 528 =item * class_id 486 529 … … 506 549 __PACKAGE__->create_table(q{ 507 550 exp_id BIGINT NOT NULL PRIMARY KEY, 551 class VARCHAR(256) NOT NULL, 508 552 class_id BIGINT NOT NULL, 509 553 url VARCHAR(255) NOT NULL … … 512 556 } 513 557 558 514 559 =item * prepared 515 560
Note:
See TracChangeset
for help on using the changeset viewer.
