def get_scheduler_events(event):
 scheduler_events = frappe.cache().get_value(u'scheduler_events')
 if (not scheduler_events):
  scheduler_events = frappe.get_hooks(u'scheduler_events')
  integration_events = get_integration_service_events()
  for (key, handlers) in integration_events.items():
   scheduler_events.setdefault(key, []).extend(handlers)
  frappe.cache().set_value(u'scheduler_events', scheduler_events)
 return (scheduler_events.get(event) or [])

def get_scheduler_events ( event ) : scheduler_events = frappe . cache ( ) . get_value ( u'scheduler_events' ) if ( not scheduler_events ) : scheduler_events = frappe . get_hooks ( u'scheduler_events' ) integration_events = get_integration_service_events ( ) for ( key , handlers ) in integration_events . items ( ) : scheduler_events . setdefault ( key , [ ] ) . extend ( handlers ) frappe . cache ( ) . set_value ( u'scheduler_events' , scheduler_events ) return ( scheduler_events . get ( event ) or [ ] )
get scheduler events from hooks and integrations .