[Sync] update: removed unnecesarry Sync subclasses
This commit is contained in:
1 parent
84745ead6d
commit
6fa8564cc8
15 files changed
+163
-471
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import logging
|
||||
|
||||
from toml import loads as toml_str
|
||||
from yaml import load as yaml
|
||||
|
||||
@@ -10,7 +8,6 @@ from sync.models import Model
|
||||
|
||||
from utils.fn import constant
|
||||
|
||||
logger = logging.getLogger(settings.name + '.Person')
|
||||
store = collection(settings.collection_schedules)
|
||||
|
||||
|
||||
@@ -24,6 +21,14 @@ def find(item_id: str):
|
||||
|
||||
|
||||
class Schedule(Model):
|
||||
@staticmethod
|
||||
async def find(query):
|
||||
return store.find(query)
|
||||
|
||||
@staticmethod
|
||||
async def delete(query):
|
||||
return store.find_one_and_delete(query)
|
||||
|
||||
@staticmethod
|
||||
async def scan(provider):
|
||||
documents = provider.type_filter('.', '.yaml')
|
||||
|
||||
Reference in new issue
Block a user