summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-07-24 18:00:34 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-07-24 18:00:34 +0000
commita6b180dd6806e05afd2bc42c2da2df8dea9f1f07 (patch)
treed917fdd54617c869449da671ab61892bb8cbaba6
parentd636a33af586b2f55428ca08d20c6b7095938439 (diff)
Move the tracking of the stat {httpd, clients_requesting_changes} from couch_changes module into
the couch_httpd_db module (that stat shouldn't be affected when the changes API is used for internal operations). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@978918 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_changes.erl4
-rw-r--r--src/couchdb/couch_httpd_db.erl3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/couchdb/couch_changes.erl b/src/couchdb/couch_changes.erl
index 52ebea69..3a5bc4f8 100644
--- a/src/couchdb/couch_changes.erl
+++ b/src/couchdb/couch_changes.erl
@@ -38,10 +38,6 @@ handle_changes(#changes_args{style=Style}=Args1, Req, Db) ->
),
start_sending_changes(Callback, Args#changes_args.feed),
{Timeout, TimeoutFun} = get_changes_timeout(Args, Callback),
- couch_stats_collector:track_process_count(
- Self,
- {httpd, clients_requesting_changes}
- ),
try
keep_sending_changes(
Args,
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index c11f54f3..e8b3f6b0 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -106,6 +106,9 @@ handle_changes_req(#httpd{method='GET'}=Req, Db) ->
FeedChangesFun(MakeCallback(Resp))
end
end,
+ couch_stats_collector:track_process_count(
+ {httpd, clients_requesting_changes}
+ ),
WrapperFun(ChangesFun);
handle_changes_req(#httpd{path_parts=[_,<<"_changes">>]}=Req, _Db) ->