Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Task list not consistent #1154

Closed
felipewd opened this issue Aug 22, 2016 · 3 comments
Closed

Task list not consistent #1154

felipewd opened this issue Aug 22, 2016 · 3 comments

Comments

@felipewd
Copy link

Hi,

When listing tasks, if I run snapctl task list a few times, the tasks are listed in different ways (not always, but a few times).

This lead me to almost stop the wrong task, and I can see other people making the same mistake I did in a production environment.

I talked it over on Slack, and @IRCody suggested listing the tasks ordered by time created, which I agree.

If you guys could take a look, that'd great.

@IRCody
Copy link
Contributor

IRCody commented Aug 22, 2016

After a brief look I think the best place to change this would be in snapctl. I think sorting it before going into this loop is all that would be required.

@andrzej-k
Copy link
Contributor

Hey @felipewd, maybe this is obvious, and you probably know about this, but you can give task a name, that may allow to better identify tasks.
That is --name, or -n switch for snapctl task create, or using name as part of task manifest:

---
  version: 1
  name: "task_name_here"
  schedule:
    type: "simple"
    interval: "1s"
  max-failures: 10
  workflow:
    collect:
      metrics:

@felipewd
Copy link
Author

Hi @andrzej-k, I did know that. But if I want to do a task stop, for example, I can't reference the name.

I have to reference the Task ID, so, my original problem remains the same, right? :)

mareahall added a commit to mareahall/snap that referenced this issue Sep 19, 2016
mareahall added a commit to mareahall/snap that referenced this issue Sep 19, 2016
mareahall added a commit to mareahall/snap that referenced this issue Sep 19, 2016
mareahall added a commit to mareahall/snap that referenced this issue Sep 19, 2016
…e ordered by

creation time.

Fixes intelsdi-x#1154: Added return statement to swap function
@IRCody IRCody closed this as completed in 005272f Sep 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants