Changeset 1343
- Timestamp:
- 01/29/08 21:22:23 (6 months ago)
- Files:
-
- branches/release-29/lib/MT/Worker/Publish.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-29/lib/MT/Worker/Publish.pm
r1174 r1343 24 24 # and process them in one pass. 25 25 26 my @jobs ;27 push @jobs, $job;26 my @jobs = ($job); 27 my $job_iter; 28 28 if (my $key = $job->coalesce) { 29 while (my $job = MT::TheSchwartz->instance->find_job_with_coalescing_value($class, $key)) { 30 push @jobs, $job; 31 } 29 $job_iter = sub { 30 shift @jobs || MT::TheSchwartz->instance->find_job_with_coalescing_value($class, $key); 31 }; 32 } 33 else { 34 $job_iter = sub { shift @jobs }; 32 35 } 33 36 … … 40 43 my $rebuilt = 0; 41 44 42 foreach $job (@jobs) {45 while (my $job = $job_iter->()) { 43 46 my $fi_id = $job->uniqkey; 44 47 my $fi = MT::FileInfo->load($fi_id);
