lukaszraczylo / jobs-manager-operator

Kubernetes jobs management operator. Schedule long running tasks or jobs dependent on each other and groups.
40 stars 0 forks source link

Regarding the implementation issues of mutual dependence of job resource objects #15

Closed googs1025 closed 9 months ago

googs1025 commented 10 months ago

Hello, I have recently been working on a project similar to one where job depends on execution. I would like to ask if job b depends on job a. When entering coordination, job a must be created. How to realize the waiting for job b later or how to call back so that the resources in the coordination loop receive the completion of job a and execute job b? My understanding is that it should not be possible to patrol and wait to check the status in the coordination loop, right? Sorry, I don’t see logic similar to the callback after job a is completed in controller.go. Please take the time to reply. grateful!

lukaszraczylo commented 10 months ago

Hi @googs1025 - you need to build your dependency tree, then trigger first job in the dependency tree and observe its completion status, once its 'complete' - then you can progress with the next one :)

googs1025 commented 10 months ago

Thank you for participating in answering questions But I have a question, how can I observe the completion status of the Job? How do I design it in the code? Because we know that creating a Job is an asynchronous operation, we don’t know whether it is completed.

googs1025 commented 9 months ago

Thanks for your answer, I have solved my question!!