12 lines
368 B
Python
12 lines
368 B
Python
msgs = [] # in-memory list of recent messages for new websocket clients; also logged to file via notify.eventlog
|
|
class Data:
|
|
|
|
def __init__(self, config):
|
|
self.config = config
|
|
self.data = {}
|
|
|
|
def update(self, new_data):
|
|
self.data.update(new_data)
|
|
|
|
def get(self, key, default=None):
|
|
return self.data.get(key, default) |