summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2020-09-08 20:14:18 -0400
committerNick Vatamaniuc <vatamane@apache.org>2020-09-08 20:14:18 -0400
commit3c2f0fb04d15d89cdeff1e0ccdb386a322bd6c83 (patch)
tree5827772c9d46136917806ca3dea637e24981836a
parentfe7d5215297c1eca389c5580717e11476c3d5a4e (diff)
downloadcouchdb-update-couch-jobs-types-when-setting-any-type.tar.gz
Update all the type monitors after setting any couch jobs type timeoutupdate-couch-jobs-types-when-setting-any-type
This mostly helps with flaky tests where some jobs might complete before the type monitor discovers this particular type, so opt to always re-scan and start notification monitors when any type timeout is set.
-rw-r--r--src/couch_jobs/src/couch_jobs.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couch_jobs/src/couch_jobs.erl b/src/couch_jobs/src/couch_jobs.erl
index f6fb62664..f5d6a7b96 100644
--- a/src/couch_jobs/src/couch_jobs.erl
+++ b/src/couch_jobs/src/couch_jobs.erl
@@ -293,7 +293,8 @@ wait(Subs, State, Timeout) when is_list(Subs),
set_type_timeout(Type, Timeout) ->
couch_jobs_fdb:tx(couch_jobs_fdb:get_jtx(), fun(JTx) ->
couch_jobs_fdb:set_type_timeout(JTx, Type, Timeout)
- end).
+ end),
+ ok = couch_jobs_server:force_check_types().
-spec clear_type_timeout(job_type()) -> ok.