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

Option to set name or print job_id only #151

Closed
elbaro opened this issue Dec 18, 2020 · 2 comments · Fixed by #152
Closed

Option to set name or print job_id only #151

elbaro opened this issue Dec 18, 2020 · 2 comments · Fixed by #152
Assignees
Labels
t: Feature A new feature that needs implementation

Comments

@elbaro
Copy link

elbaro commented Dec 18, 2020

I want to spawn a few jobs with dependencies.
This is using bash regex:

out=$(pueue add -- echo 123)
[[ $out =~ .+id[[:space:]](.+)\).+ ]]
job_id=${BASH_REMATCH[1]}
pueue add --after $job_id -- echo 456

Describe the solution you'd like

with --name

pueue add --name job1 -- echo 123
pueue add --after job1 -- echo 456

with --print-job-id

job_id=$(pueue add --print-job-id -- echo 123)
pueue add --after $job_id -- echo 456
@elbaro elbaro added the t: Feature A new feature that needs implementation label Dec 18, 2020
@Nukesor
Copy link
Owner

Nukesor commented Dec 18, 2020

Hm. I see how using dependencies can be annoying when scripting stuff.

In my opinion, the --print-task-id flag is the more elegant solution, since it solves the problem just as well and doesn't need an additional field on the task or column in the status overview. This should be implemented in a few minutes :D

@Nukesor Nukesor self-assigned this Dec 18, 2020
This was referenced Dec 18, 2020
@elbaro
Copy link
Author

elbaro commented Dec 19, 2020

Thanks, that was fast.
In fact I found --name is useful for other reasons. I will create a separate issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: Feature A new feature that needs implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants