added main loop stub
This commit is contained in:
parent
ed2d016715
commit
0e236a4be3
|
@ -0,0 +1,14 @@
|
|||
from mobilizon_bots.storage.db import MobilizonBotsDB
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
STUB
|
||||
:return:
|
||||
"""
|
||||
db = MobilizonBotsDB().setup()
|
||||
unpublished_events = Mobilizon().get_unpublished_events()
|
||||
published_events = db.get_published_events()
|
||||
event = select_event_to_publish()
|
||||
result = PublisherCoordinator(event).publish() if event else exit(0)
|
||||
exit(0 if result.is_success() else 1)
|
|
@ -3,8 +3,8 @@ from pathlib import Path
|
|||
from tortoise import Tortoise
|
||||
|
||||
|
||||
class MobotsDB:
|
||||
def __init__(self, path: Path):
|
||||
class MobilizonBotsDB:
|
||||
def __init__(self, path: Path = None):
|
||||
self.path = path
|
||||
|
||||
async def setup(self):
|
||||
|
|
Loading…
Reference in New Issue