Remove .heartbeat.lua from redbean (#554)

It's been replaced by `OnServerHeartbeat`.
This commit is contained in:
Paul Kulchenko 2022-08-20 01:31:58 -07:00 committed by GitHub
parent d76dfadc7a
commit a51edaa0db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -564,8 +564,7 @@ HOOKS
OnServerHeartbeat()
If this function is defined it'll be called from the main process
on each server heartbeat. The heartbeat interval is configurable
with ProgramHeartbeatInterval. If this hook is defined, then
`/.heartbeat.lua` is not called.
with ProgramHeartbeatInterval.
OnServerListen(socketdescriptor:int,serverip:int,serverport:int) → bool
If this function is defined it'll be called from the main process

View file

@ -5783,11 +5783,7 @@ static void HandleHeartbeat(void) {
Reindex();
getrusage(RUSAGE_SELF, &shared->server);
#ifndef STATIC
if (IsHookDefined("OnServerHeartbeat")) {
CallSimpleHook("OnServerHeartbeat");
} else {
LuaRunAsset("/.heartbeat.lua", false);
}
CallSimpleHookIfDefined("OnServerHeartbeat");
CollectGarbage();
#endif
for (i = 1; i < servers.n; ++i) {