hook_event_dispatcher compatability

Created on 7 April 2022, over 2 years ago
Updated 3 February 2024, 10 months ago

For those building their site using events and utilizing hook_event_dispatcher ( https://www.drupal.org/project/hook_event_dispatcher β†’ ) it would be nice to be able to utilize this module. I'm not sure if it can be done, or the logistics, but just incase others are intersted as well, I'm starting the conversation and/or work here!

✨ Feature request
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jnicola

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States graper

    Supporting Hook Event Dispatcher would only show 1 single "job" which would reflect the legacy hook_cron() found in the hook event dispatcher sub module for core events.

    I think Ultimate Cron could create its own event that can be subscribed to, which could then be detected and scheduled within Ultimate Cron's UI when another module subscribes to the event.

  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    You can't control events like that. Ultimate Cron is all about per-cronjob management and an event either happens or not. It's not about hooks or events, ultimate_cron is about callbacks, which can be functions or service methods. hooks happen to be valid callbacks, events are not. But #3 has a simple enough workaround. If cron is going to rework hook_cron into something else, then it would need to be a plugin system to be compatible with what we are doing here.

  • Status changed to Closed: duplicate 10 months ago
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    Closing as duplicate of πŸ› Invoke hooks via the 'module_handler' service Needs work which might work for hook_event_dispatcher as well and the long-term plan which is πŸ“Œ Support CronSubscribers Active

Production build 0.71.5 2024