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/20 15:00:41 UTC

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

nickva commented on a change in pull request #3003:
URL: https://github.com/apache/couchdb/pull/3003#discussion_r457468173



##########
File path: src/couch_jobs/src/couch_jobs_fdb.erl
##########
@@ -355,6 +357,13 @@ get_activity_vs_and_watch(#{jtx := true} = JTx, Type) ->
     end.
 
 
+get_active_jobs(Type) ->

Review comment:
       Since we are calling it from the outside of couch_jobs let's add this function to couch_jobs module.  There it could look like:
   
   ```
   get_active_jobs(Tx, Type) ->
       couch_jobs_fdb:tx(couch_jobs_fdb:get_jtx(Tx), fun(JTx) ->
           couch_jobs_fdb:get_active_since(JTx, Type, {versionstamp, 0, 0}})
       end).
   ```
   
   `Tx` could then be `undefined`, a plain transaction from erldb or a TxDb one from `fabric2_db`
   




----------------------------------------------------------------
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