Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get tasks info (like affinity) by job on Enqueueable actions? #3661

Open
TimRazumov opened this issue Aug 7, 2024 · 2 comments
Open

Comments

@TimRazumov
Copy link

TimRazumov commented Aug 7, 2024

Please describe your problem in detail

Hi everyone! I have a problem: on Enqueueable actions field job.Tasks is empty, but I want to use tasks details like pod's affinity or priority in my JobEnqueueableFn's logic

example:

	ssn.AddJobEnqueueableFn(p.Name(), func(obj any) int {
		job := obj.(*api.JobInfo)
		for _, task := range job.Tasks { <---------- it is empty and it is problem for me
			if !p.myFunc(task) {
				return util.Permit
			}
		}
              .....

How can I to do it? Are there any ways?

Any other relevant information

No response

@TimRazumov TimRazumov changed the title How I can get tasks info (like affinity) by job on Enqueueable actions? How can I get tasks info (like affinity) by job on Enqueueable actions? Aug 7, 2024
@lowang-bh
Copy link
Member

Your pod shoud have an annotation of group-name

@TimRazumov
Copy link
Author

ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants