diff options
author | Michael Klishin <michael@rabbitmq.com> | 2014-07-30 20:04:15 +0400 |
---|---|---|
committer | Michael Klishin <michael@rabbitmq.com> | 2014-07-30 20:04:15 +0400 |
commit | 73413ba9d491b9584528a555f8ef646a14c67880 (patch) | |
tree | cdf79dbff96e7c6f57a880fd779dc1da3212437b | |
parent | 322a5f539e269c56d6a8c8af27f576c266b668b9 (diff) | |
download | rabbitmq-server-73413ba9d491b9584528a555f8ef646a14c67880.tar.gz |
Make consumer_utilisation default to null
null is the best way there is to represent a lack of numerical
value in JSON. JSON parsers in statically typed languages (e.g. Go)
will trip up on empty strings.
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 9b785303..cca70fa9 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1261,7 +1261,7 @@ handle_pre_hibernate(State = #q{backing_queue = BQ, rabbit_event:if_enabled( State, #q.stats_timer, fun () -> emit_stats(State, [{idle_since, now()}, - {consumer_utilisation, ''}]) end), + {consumer_utilisation, null}]) end), State1 = rabbit_event:stop_stats_timer(State#q{backing_queue_state = BQS3}, #q.stats_timer), {hibernate, stop_rate_timer(State1)}. |