mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-09 19:52:37 +01:00
Added world.starting to know that we shouldn't flush.
This commit is contained in:
parent
69671d55a3
commit
f364bb9705
@ -261,6 +261,7 @@ if __name__ == '__main__':
|
||||
import log
|
||||
import conf
|
||||
import world
|
||||
world.starting = True
|
||||
|
||||
def closeRegistry():
|
||||
# We only print if world.dying so we don't see these messages during
|
||||
|
@ -189,10 +189,14 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
m = loadPluginModule(name)
|
||||
loadPluginClass(irc, m)
|
||||
except Exception, e:
|
||||
log.exception('Failed to load %s:' % name)
|
||||
log.exception('Failed to load %s:', name)
|
||||
else:
|
||||
# Let's import the module so configuration is preserved.
|
||||
_ = loadPluginModule(name)
|
||||
try:
|
||||
_ = loadPluginModule(name)
|
||||
except Exception, e:
|
||||
log.exception('Failed to load %s:', name)
|
||||
world.starting = False
|
||||
|
||||
def disambiguate(self, irc, tokens, ambiguousCommands=None):
|
||||
"""Disambiguates the given tokens based on the plugins loaded and
|
||||
|
@ -55,6 +55,8 @@ import schedule
|
||||
|
||||
startedAt = time.time() # Just in case it doesn't get set later.
|
||||
|
||||
starting = False
|
||||
|
||||
mainThread = threading.currentThread()
|
||||
assert 'MainThread' in repr(mainThread)
|
||||
|
||||
@ -86,7 +88,7 @@ def upkeep():
|
||||
pass
|
||||
if gc.garbage:
|
||||
log.warning('Uncollectable garbage: %s', gc.garbage)
|
||||
flushed = conf.supybot.flush()
|
||||
flushed = conf.supybot.flush() and not starting
|
||||
if flushed:
|
||||
flush()
|
||||
# This is so registry._cache gets filled.
|
||||
|
Loading…
Reference in New Issue
Block a user