This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch 3.3.x in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit d16fddd0a30b75001a160c76c531d98444ea50cd Author: Jan Lehnardt <[email protected]> AuthorDate: Thu Jan 5 11:36:17 2023 +0100 fix: undefined function warning --- src/weatherreport/src/weatherreport_check_ioq.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/weatherreport/src/weatherreport_check_ioq.erl b/src/weatherreport/src/weatherreport_check_ioq.erl index a0e0b0e60..2a20b78ad 100644 --- a/src/weatherreport/src/weatherreport_check_ioq.erl +++ b/src/weatherreport/src/weatherreport_check_ioq.erl @@ -85,7 +85,14 @@ check(Opts) -> end. -spec check_legacy(list()) -> [{atom(), term()}]. -check_legacy(_Opts) -> +check_legacy(Opts) -> + case erlang:function_exported(ioq, get_disk_queues, 0) of + true -> check_legacy_int(Opts); + false -> [{warning, {ioq_requests_unknown, undef}}] + end. + +-spec check_legacy_int(list()) -> [{atom(), term()}]. +check_legacy_int(_Opts) -> case ioq:get_disk_queues() of Queues when is_list(Queues) -> Total = sum_queues(Queues, 0),
