mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Made world cleanup drivers, too.
This commit is contained in:
parent
63c64af2e4
commit
a7ba5a0f25
@ -49,6 +49,7 @@ import threading
|
|||||||
|
|
||||||
import log
|
import log
|
||||||
import conf
|
import conf
|
||||||
|
import drivers
|
||||||
import ircutils
|
import ircutils
|
||||||
|
|
||||||
socket.setdefaulttimeout(10)
|
socket.setdefaulttimeout(10)
|
||||||
@ -94,6 +95,12 @@ def upkeep():
|
|||||||
log.info('%s upkeep ran.', time.strftime(conf.logTimestampFormat))
|
log.info('%s upkeep ran.', time.strftime(conf.logTimestampFormat))
|
||||||
return collected
|
return collected
|
||||||
|
|
||||||
|
def makeDriversDie():
|
||||||
|
"""Kills drivers."""
|
||||||
|
log.info('Killing Driver objects.')
|
||||||
|
for driver in drivers._drivers.itervalues():
|
||||||
|
driver.die()
|
||||||
|
|
||||||
def makeIrcsDie():
|
def makeIrcsDie():
|
||||||
"""Kills Ircs."""
|
"""Kills Ircs."""
|
||||||
log.info('Killing Irc objects.')
|
log.info('Killing Irc objects.')
|
||||||
@ -112,6 +119,7 @@ def finished():
|
|||||||
atexit.register(finished)
|
atexit.register(finished)
|
||||||
atexit.register(upkeep)
|
atexit.register(upkeep)
|
||||||
atexit.register(makeIrcsDie)
|
atexit.register(makeIrcsDie)
|
||||||
|
atexit.register(makeDriversDie)
|
||||||
atexit.register(startDying)
|
atexit.register(startDying)
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user