Skip to content

Commit

Permalink
tmux: Skip non-robin jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
unkaktus committed Jun 3, 2024
1 parent f353fbb commit bfcd473
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions batchsystem/tmux/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ func query() (ListOutput, error) {

func listOutputToJobList(listOutput ListOutput) (jobs []robin.Job, err error) {
for _, listedJob := range listOutput {
ID := strings.TrimPrefix(listedJob.ID, "$")
creationTime := time.Unix(listedJob.CreationTime, 0)

if !strings.HasPrefix(listedJob.Name, "robin_") {
continue
}
nameData := &NameData{}
err = nameData.DecodeString(listedJob.Name)
if err != nil {
return nil, fmt.Errorf("decode name data: %w", err)
}

ID := strings.TrimPrefix(listedJob.ID, "$")
creationTime := time.Unix(listedJob.CreationTime, 0)

job := robin.Job{
Name: nameData.Name,
ID: ID,
Expand Down

0 comments on commit bfcd473

Please sign in to comment.