Save sites.json on exit
This commit is contained in:
parent
a12c639bed
commit
3724e0f376
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ import logging
|
|||
import re
|
||||
import os
|
||||
import time
|
||||
import atexit
|
||||
|
||||
import gevent
|
||||
|
||||
|
@ -19,6 +20,7 @@ class SiteManager(object):
|
|||
self.log.debug("SiteManager created.")
|
||||
self.sites = None
|
||||
gevent.spawn(self.saveTimer)
|
||||
atexit.register(self.save)
|
||||
|
||||
# Load all sites from data/sites.json
|
||||
def load(self):
|
||||
|
|
Loading…
Reference in a new issue