API: Can't filter tasks by queued/errored #66

Closed
btaylor opened this Issue Apr 17, 2013 · 3 comments

Projects

None yet

2 participants

@btaylor
btaylor commented Apr 17, 2013

According to the docs, the projects/tasks endpoint should be filterable by status. Unfortunately, not all of the status filters work:

WORKING:

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks
{ "tasks": [ { "status": "complete", "code_name": "process_data::builder",...

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?running=1
{ "tasks": [] }

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?complete=1
{ "tasks": [ { "status": "complete", "code_name": "process_data::builder",...

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?cancelled=1
{ "tasks": [ { "status": "cancelled", "code_name": "process_data::builder",...

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?killed=1
{ "tasks": [ { "status": "killed", "code_name": "process_data::builder",...

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?timeout=1
{ "tasks": [] }

NOT WORKING:

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?queued=1
{ "tasks": [ { "status": "complete", "code_name": "process_data::builder",...

https://worker-aws-us-east-1.iron.io/2/projects/51100646d429792e99001a86/tasks?error=1
{ "tasks": [ { "status": "complete", "code_name": "process_data::builder",...

Obviously oauth token has been omitted.

@treeder
Member
treeder commented Apr 17, 2013

We'll be fixing this very soon and will update when done.

@btaylor
btaylor commented Apr 17, 2013

To add to this, what I'd really love would be an API that I can just get the count of tasks in various statuses. Even when this is working, I can only see up to 100 tasks, so I won't really know the real number of queued/errored/etc jobs.

@treeder
Member
treeder commented Apr 25, 2013

This should be fixed now. Also, you can search with code_name now too so you don't get all tasks for all your workers.

@treeder treeder closed this Nov 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment