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 log
|
||||||
import conf
|
import conf
|
||||||
import world
|
import world
|
||||||
|
world.starting = True
|
||||||
|
|
||||||
def closeRegistry():
|
def closeRegistry():
|
||||||
# We only print if world.dying so we don't see these messages during
|
# 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)
|
m = loadPluginModule(name)
|
||||||
loadPluginClass(irc, m)
|
loadPluginClass(irc, m)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.exception('Failed to load %s:' % name)
|
log.exception('Failed to load %s:', name)
|
||||||
else:
|
else:
|
||||||
# Let's import the module so configuration is preserved.
|
# 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):
|
def disambiguate(self, irc, tokens, ambiguousCommands=None):
|
||||||
"""Disambiguates the given tokens based on the plugins loaded and
|
"""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.
|
startedAt = time.time() # Just in case it doesn't get set later.
|
||||||
|
|
||||||
|
starting = False
|
||||||
|
|
||||||
mainThread = threading.currentThread()
|
mainThread = threading.currentThread()
|
||||||
assert 'MainThread' in repr(mainThread)
|
assert 'MainThread' in repr(mainThread)
|
||||||
|
|
||||||
@ -86,7 +88,7 @@ def upkeep():
|
|||||||
pass
|
pass
|
||||||
if gc.garbage:
|
if gc.garbage:
|
||||||
log.warning('Uncollectable garbage: %s', gc.garbage)
|
log.warning('Uncollectable garbage: %s', gc.garbage)
|
||||||
flushed = conf.supybot.flush()
|
flushed = conf.supybot.flush() and not starting
|
||||||
if flushed:
|
if flushed:
|
||||||
flush()
|
flush()
|
||||||
# This is so registry._cache gets filled.
|
# This is so registry._cache gets filled.
|
||||||
|
Loading…
Reference in New Issue
Block a user