mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Maintenance time calculations should be done in minutes, not seconds.
Should resolve #2336
This commit is contained in:
parent
ca58209244
commit
7d20d35375
2 changed files with 5 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ def _portal_maintenance():
|
|||
|
||||
_MAINTENANCE_COUNT += 1
|
||||
|
||||
if _MAINTENANCE_COUNT % (3600 * 7) == 0:
|
||||
if _MAINTENANCE_COUNT % (60 * 7) == 0:
|
||||
# drop database connection every 7 hrs to avoid default timeouts on MySQL
|
||||
# (see https://github.com/evennia/evennia/issues/1376)
|
||||
connection.close()
|
||||
|
|
|
|||
|
|
@ -140,16 +140,16 @@ def _server_maintenance():
|
|||
_GAMETIME_MODULE.SERVER_RUNTIME_LAST_UPDATED = now
|
||||
ServerConfig.objects.conf("runtime", _GAMETIME_MODULE.SERVER_RUNTIME)
|
||||
|
||||
if _MAINTENANCE_COUNT % 300 == 0:
|
||||
if _MAINTENANCE_COUNT % 5 == 0:
|
||||
# check cache size every 5 minutes
|
||||
_FLUSH_CACHE(_IDMAPPER_CACHE_MAXSIZE)
|
||||
if _MAINTENANCE_COUNT % 3600 == 0:
|
||||
if _MAINTENANCE_COUNT % 60 == 0:
|
||||
# validate scripts every hour
|
||||
evennia.ScriptDB.objects.validate()
|
||||
if _MAINTENANCE_COUNT % 3700 == 0:
|
||||
if _MAINTENANCE_COUNT % 61 == 0:
|
||||
# validate channels off-sync with scripts
|
||||
evennia.CHANNEL_HANDLER.update()
|
||||
if _MAINTENANCE_COUNT % (3600 * 7) == 0:
|
||||
if _MAINTENANCE_COUNT % (60 * 7) == 0:
|
||||
# drop database connection every 7 hrs to avoid default timeouts on MySQL
|
||||
# (see https://github.com/evennia/evennia/issues/1376)
|
||||
connection.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue