watchtower: watch new channels
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
import concurrent
|
||||
import queue
|
||||
import threading
|
||||
import asyncio
|
||||
@@ -10,7 +9,10 @@ from .util import test_read_write_permissions
|
||||
|
||||
|
||||
def sql(func):
|
||||
"""wrapper for sql methods"""
|
||||
"""wrapper for sql methods
|
||||
|
||||
returns an awaitable asyncio.Future
|
||||
"""
|
||||
def wrapper(self: 'SqlDB', *args, **kwargs):
|
||||
assert threading.currentThread() != self.sql_thread
|
||||
f = self.asyncio_loop.create_future()
|
||||
@@ -20,7 +22,7 @@ def sql(func):
|
||||
|
||||
|
||||
class SqlDB(Logger):
|
||||
|
||||
|
||||
def __init__(self, asyncio_loop: asyncio.BaseEventLoop, path, commit_interval=None):
|
||||
Logger.__init__(self)
|
||||
self.asyncio_loop = asyncio_loop
|
||||
|
||||
Reference in New Issue
Block a user