TakawaAkirayo commented on code in PR #41232:
URL: https://github.com/apache/airflow/pull/41232#discussion_r1716611828
##########
tests/jobs/test_triggerer_job.py:
##########
@@ -787,3 +801,323 @@ def non_pytest_handlers(val):
assert qh.__class__ == LocalQueueHandler
assert qh.queue == listener.queue
listener.stop()
+
+
+class RemoteJob:
+ RUNNING_STATUS = "running"
+ FAILED_STATUS = "failed"
+ SUCCESS_STATUS = "success"
+
+ def __init__(self, status):
+ self.status = status
+
+ def get_status(self):
+ return self.status
+
+ def set_status(self, status):
+ self.status = status
+
+ def kill(self):
+ self.set_status(RemoteJob.FAILED_STATUS)
+
+
+class RemoteService:
Review Comment:
The purpose of this approach is that the trigger, once instantiated, isn't
stored anywhere and is directly put into running state after initialization,
making it impossible to access the instance directly. Therefore, I have made it
register itself in a singleton during initialization, which allows me to access
it
--
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]