@@ -169,14 +169,14 @@ handle_call({set_max_check_interval, MaxInterval}, _From, State) ->
169
169
handle_call (get_disk_free , _From , State = # state { actual = Actual }) ->
170
170
{reply , Actual , State };
171
171
172
- handle_call ({set_enabled , Enabled }, _From , State ) ->
173
- case Enabled of
174
- Enabled when Enabled == false ->
175
- erlang : cancel_timer ( State # state . timer ) ;
176
- Enabled when Enabled == true ->
177
- start_timer ( set_disk_limits ( State , State # state .limit ))
178
- end ,
179
- {reply , ok , State # state {enabled = Enabled }};
172
+ handle_call ({set_enabled , _Enabled = true }, _From , State ) ->
173
+ start_timer ( set_disk_limits ( State , State # state . limit )),
174
+ rabbit_log : info ( " Free disk space monitor was enabled " ),
175
+ { reply , ok , State # state { enabled = true }} ;
176
+ handle_call ({ set_enabled , _Enabled = false }, _From , State ) ->
177
+ erlang : cancel_timer ( State # state .timer ),
178
+ rabbit_log : info ( " Free disk space monitor was manually disabled " ) ,
179
+ {reply , ok , State # state {enabled = false }};
180
180
181
181
handle_call (_Request , _From , State ) ->
182
182
{noreply , State }.
0 commit comments