You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/07/14 15:02:30 UTC

[GitHub] [couchdb] nickva edited a comment on pull request #3003: add active_tasks for view builds using version stamps

nickva edited a comment on pull request #3003:
URL: https://github.com/apache/couchdb/pull/3003#issuecomment-658229486


   @tonysun83 
   
   Agree with @garrensmith, for reporting the job on all the nodes, it might be easier to think of something like this:
   
     * Having an `<<"active_task_status">>` section to each job's data section, already converted to json format.
   
     * In the http handler we would query all the active jobs and just emit those json objects. All active jobs are conveniently already located under a single `?ACTIVITY` subspace and can be queried with [get_active_since/3] https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/couch_jobs/src/couch_jobs_fdb.erl#L358) (it was done that way on purpose to make it simple to query all active jobs in order to report _active_tasks easier 😉 ).
   
    * To get all the possible job types can use [get_types](https://github.com/apache/couchdb/blob/prototype/fdb-layer/src/couch_jobs/src/couch_jobs_fdb.erl#L321). 
   
    * Since we'd be calling those outside of couch_jobs we could add a new function to `couch_jobs`, something like `get_active_jobs` perhaps.
    
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org