Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Allow filtering of active tasks by property#72

Closed
rnewson wants to merge 1 commit intoapache:masterfrom
cloudant:2807-filtered-tasks
Closed

Allow filtering of active tasks by property#72
rnewson wants to merge 1 commit intoapache:masterfrom
cloudant:2807-filtered-tasks

Conversation

@rnewson
Copy link
Copy Markdown
Member

@rnewson rnewson commented Sep 11, 2015

COUCHDB-2807

@kxepal
Copy link
Copy Markdown
Member

kxepal commented Sep 12, 2015

I think API is incorrect since you use HTTP resources as filters, not to define some new thing. I think filtering should be done with query parameters, which will allow to filter by multiple properties, like "show me all replications for node1 which run by user foo against target bar".

@kxepal
Copy link
Copy Markdown
Member

kxepal commented Sep 12, 2015

Also, it seems not all properties could be used for filtering:

$ http --json http://localhost:15984/_active_tasks/continuous/true
[
    {
        "changes_pending": 1692895,
        "checkpoint_interval": 5000,
        "checkpointed_source_seq": 57182,
        "continuous": true,
        "doc_id": null,
        "doc_write_failures": 0,
        "docs_read": 6118,
        "docs_written": 6118,
        "missing_revisions_found": 6118,
        "node": "node1@127.0.0.1",
        "pid": "<0.1641.0>",
        "replication_id": "a2d6fd6b275527acdf245abca30d7597+continuous+create_target",
        "revisions_checked": 6118,
        "source": "http://localhost:5984/hashes/",
        "source_seq": 57182,
        "started_on": 1442074677,
        "target": "http://127.0.0.1:15984/hashes/",
        "through_seq": 57182,
        "type": "replication",
        "updated_on": 1442075004,
        "user": null
    }
]

$ http --json http://localhost:15984/_active_tasks/node/node1%40127.0.0.1
[]

$ http --json http --json http://localhost:15984/_active_tasks/pid/%3C0.1641.0%3E
[]

@rnewson
Copy link
Copy Markdown
Member Author

rnewson commented Sep 15, 2015

I don't like it after all

@rnewson rnewson closed this Sep 15, 2015
@davisp davisp deleted the 2807-filtered-tasks branch October 22, 2015 06:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants