diff options
author | Jan Lehnardt <jan@apache.org> | 2023-01-05 11:36:17 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2023-01-05 13:50:49 +0100 |
commit | 33d9a841b3552fa1946fe17bba3e1358a77b2d8c (patch) | |
tree | 9b632615d396f024e23992630d79082611946f67 | |
parent | 3cc22f4a88d1b18f031c89172a2ede4d13135e89 (diff) | |
download | couchdb-33d9a841b3552fa1946fe17bba3e1358a77b2d8c.tar.gz |
fix: undefined function warning
-rw-r--r-- | src/weatherreport/src/weatherreport_check_ioq.erl | 9 |
1 files changed, 8 insertions, 1 deletions
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), |