Problem/Motivation

As there currently is a server problem with the resmush.it servers, images don't get optimized during derivative creation, but the derivatives get saved in an unoptimized/failed state. Therefore it would be nice, if the imageapi_optimize module would track these failed pipeline processor calls and retry to execute them later again. processor plugins already inform the optimization whether they succeeded, so this return value can be used to add a failing image to a queue to reprocess it later again (e.g. during cron runs)

Proposed resolution

  • Create a queue to track failed image pipeline processes
  • Create QueueWorker to run during cron runs to reprocess failed image pipelines
  • Create a drush task to process the queue
  • ... and perhaps this retry behavior should be configurable (enabled/disabled) per pipeline (e.g. to avoid retries of corrupt images when using local binaries for optimization, where you may be sure that it is not a problem with an external service

Remaining tasks

  • Create a patch that introduces this new functionality

User interface changes

n/a

API changes

n/a - Processor plugins only have to ensure that they return the correct state within implementations of ImageAPIOptimizeProcessorInterface::applyToImage()

Data model changes

Comments

hctom created an issue. See original summary.

hctom’s picture

Issue summary: View changes
ndobromirov’s picture

Consider some kind of a retry limit. If the image is corrupt it does not matter how many times it will retry processing it, it might never complete.

Chris Charlton’s picture

At least some report/notice for the admins/editors to know what's going on (and be able to take action themselves how they see fit).

steven jones’s picture

Using queues ++

As a nasty way to not change the existing API we could have processors throw an exception that queues up a retry.
Or we could simply change the API :)