|
|
@ -116,7 +116,7 @@ handleCall({mSetLogHwm, Hwm}, #state{shaper = Shaper, fBName = FBName} = State) |
|
|
|
{reply, {lastHwm, Shaper#lgShaper.hwm}, State#state{shaper = NewShaper}} |
|
|
|
end; |
|
|
|
handleCall(mRotate, State = #state{fBName = FBName}) -> |
|
|
|
{ok, NewState} = handleInfo({mRotate, FBName}, State), |
|
|
|
{_, NewState} = handleInfo({mRotate, FBName}, State), |
|
|
|
{reply, ok, NewState}; |
|
|
|
handleCall(_Msg, _State) -> |
|
|
|
?ERR(<<"~p call receive unexpect msg ~p ~n ">>, [?MODULE, _Msg]), |
|
|
@ -156,8 +156,8 @@ handleInfo({mRotate, FBName}, #state{fBName = FBName, date = Date} = State) -> |
|
|
|
NewState = closeFile(State), |
|
|
|
scheduleRotation(Date, FBName), |
|
|
|
{noreply, NewState}; |
|
|
|
handleInfo({mRotate, _FBName}, _State) -> |
|
|
|
kpS; |
|
|
|
handleInfo({mRotate, _FBName}, State) -> |
|
|
|
{noreply, State}; |
|
|
|
handleInfo({mShaperExpired, FBName}, #state{shaper = Shaper, fBName = FBName, fmtTer = FmtTer, fmtCfg = FmtCfg} = State) -> |
|
|
|
case Shaper#lgShaper.dropped of |
|
|
|
0 -> |
|
|
|