potiuk commented on a change in pull request #9674:
URL: https://github.com/apache/airflow/pull/9674#discussion_r449916739
##########
File path: airflow/models/taskinstance.py
##########
@@ -483,6 +502,8 @@ def refresh_from_db(self, session=None,
lock_for_update=False) -> None:
else:
self.state = None
+ self.log.debug("Refreshed TaskInstance %s", self)
Review comment:
👍
##########
File path: airflow/models/taskinstance.py
##########
@@ -522,6 +548,17 @@ def key(self) -> TaskInstanceKeyType:
@provide_session
def set_state(self, state, session=None, commit=True):
+ """
+ Set TaskInstance state
Review comment:
❤️
##########
File path: airflow/models/taskinstance.py
##########
@@ -972,7 +1022,7 @@ def _run_raw_task(
context = {} # type: Dict
actual_start_date = timezone.utcnow()
Stats.incr('ti.start.{}.{}'.format(task.dag_id, task.task_id))
- try:
+ try: # pylint: disable=too-many-nested-blocks
Review comment:
Happy to do that if it's a problem :)
##########
File path: airflow/models/taskinstance.py
##########
@@ -972,7 +1022,7 @@ def _run_raw_task(
context = {} # type: Dict
actual_start_date = timezone.utcnow()
Stats.incr('ti.start.{}.{}'.format(task.dag_id, task.task_id))
- try:
+ try: # pylint: disable=too-many-nested-blocks
Review comment:
should we rather split it and extract one ore even few methodsf? I
think it's a very clear example of fairly complex code that can be simiplified
by extracting methods and naming them properly
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]