Allow callbacks located in *.update_worker.php to be discoverable in the context of queue worker

Created on 14 June 2023, over 1 year ago

Problem/Motivation

Callbacks that take care of handling queue items are often declared in .module file or in a service. This code is only needed for a very limited time but it stays in the codebase forever.

Proposed resolution

Add support for my_module.update_worker.php file where all callbacks can be placed. This file/These files will be loaded only in the context of the queue worker plugin so won't affect performance of the regular request. The file will also act as a reminder for required code cleanup as callbacks are typically to be removed as soon as certain update hook have been rollout in the production environment.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇴Norway zaporylie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024