mobuchowski commented on code in PR #27113:
URL: https://github.com/apache/airflow/pull/27113#discussion_r1015781659


##########
airflow/jobs/base_job.py:
##########
@@ -110,6 +111,7 @@ def __init__(self, executor=None, heartrate=None, *args, 
**kwargs):
             self.heartrate = heartrate
         self.unixname = getuser()
         self.max_tis_per_query: int = conf.getint('scheduler', 
'max_tis_per_query')
+        get_listener_manager().hook.on_starting()

Review Comment:
   The question here is really if we need this - having conflicting names for 
different scopes would be more painful for the plugin author. 
   
   I can imagine some pain points: 
   - need to remember to mark method with particular hookspec
   - can't implement the same hookspec in one file - especially with same-name 
methods, so you're forced to have multi-file plugin.
   - Airflow plugin loading API gets more confusing, since you need to know a 
priori which hookspec the plugin implements
   
   Seems like the easier solution would be to "namespace" them just by name. 
Like; `airflow_scheduler_on_starting` and `airflow_backfill_on_starting` if 
those were to be two different methods.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to