amoghrajesh commented on issue #56183:
URL: https://github.com/apache/airflow/issues/56183#issuecomment-3345211994

   Tested creating tasks using task.stub too in Python, seems to work as 
expected.
   
   DAG used:
   ```
       @stub(
           task_id="data_processing_task",
           queue="remote_workers",
       )
       def process_data():
           """This task will execute on a remote worker."""
           pass
   ```
   
   DAG for negative scenario:
   ```
   Traceback (most recent call last):
     File "/opt/airflow/task-sdk/src/airflow/sdk/bases/operator.py", line 521, 
in apply_defaults
       result = func(self, **kwargs, default_args=default_args)
     File 
"/usr/python/lib/python3.10/site-packages/airflow/providers/standard/decorators/stub.py",
 line 70, in __init__
       raise ValueError(
   ValueError: Functions passed to @task.stub must be an empty function 
(`pass`, or `...` only) (got <ast.Assign object at 0xffff7591d660>)
   ```
   
   I'd say all good!


-- 
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