Postponed
Project:
Drupal core
Version:
main
Component:
media system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Jul 2018 at 20:54 UTC
Updated:
29 Aug 2022 at 08:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
vijaycs85We could try
a) throw an exception for cases that just need to be simple logging.
b) Dispatch an event for the cases that require additional actions - e.g. adding to queue.
Here is a (sample) patch to handle thumbnail update failure. This patch applied on top of #2878119-101: Whether queued or not, update the media thumbnail and metadata before beginning the entity save database transaction and just for review purpose.
Comment #4
deviantintegral commentedI like the idea of dispatching an event for error handling. However, is there ever a reason why multiple subscribers would want to respond to the same event? It seems like there'd be close to a one-to-one mapping between media source plugins and subscriber implementations.
To me, what's missing currently is good default handling for common error conditions, especially related to network or HTTP errors. For example, if a thumbnail update times out, or 503s, it would be reasonable to transparently requeue the thumbnail. I think the same holds for metadata updates too. It feels a bit fragile to require contrib developers to duplicate this in most modules providing a media source.
So how about something like:
Thoughts?
Comment #5
deviantintegral commentedComment #13
quietone commentedThe issue this is postponed has been closed as won't fix. The last comments in that issue refer to continuing in #2983456: Expose triggering update of media metadata + thumbnail to end users so I am changing this issue to be postponed on that issue.