Plugin Directory


Ignore:
Timestamp:
10/11/2026 02:52:48 PM (5 weeks ago)
Author:
enetrato
Message:

Release VeloIMG 0.9.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • veloimg/trunk/src/Queue/Worker.php

    r3715784 r3739629  
    66
    77use VeloWP\Converter\Processor;
     8use VeloWP\Conversion\WebpRetry;
    89use VeloWP\Concurrency\LeaseLostException;
    910use VeloWP\Core\Checker;
    … …  
    181182                        $files_repo = new FilesRepository();
    182183                        $proc     = new Processor( $store, $mapper, $files_repo, (array) ( $report['caps'] ?? array() ), $settings, array( 'assert_ownership' => static function () use ( $token ) : void { Lock::assert_owned( $token ); } ) );
     184                        $retry_proc = null;
    183185
    184186                        foreach ( $pending as $task ) {
    … …  
    243245                                }
    244246
    245                                 $res = $proc->generate_from_rel( $orig, false );
     247                                // Generic ticks may also process automatic uploads. Only rows owned by
     248                                // this exact retry run receive its immutable settings, including after Resume.
     249                                $task_proc = $proc;
     250                                if ( '' !== $task_run_id && $task_run_id === (string) ( $mass_activation['run_id'] ?? '' ) && ! empty( $mass_activation['retry'] ) ) {
     251                                        if ( null === $retry_proc ) {
     252                                                $retry = (array) $mass_activation['retry'];
     253                                                $retry_proc = new Processor( $store, $mapper, $files_repo, WebpRetry::caps( (array) ( $report['caps'] ?? array() ), $retry ), WebpRetry::settings( $settings, $retry ), array( 'assert_ownership' => static function () use ( $token ) : void { Lock::assert_owned( $token ); } ) );
     254                                        }
     255                                        $task_proc = $retry_proc;
     256                                }
     257                                $res = $task_proc->generate_from_rel( $orig, false );
    246258                                Lock::assert_owned( $token );
    247259                                if ( empty( $res['ok'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.