result = None if task_copy.execution_timeout: with utils.timeout(int( task_copy.execution_timeout.total_seconds())): result = task_copy.execute(context=context) else: result = task_copy.execute(context=context) # If the task returns a result, push an XCom containing it if result is not None: self.xcom_push(key=XCOM_RETURN_KEY, value=result)