Something went wrong. Try again.
a fork of EvalEx by ezylang with a handful of breaking changes
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233from typing import override
from cross.post import Post, PostReffrom cross.service import OutputServicefrom database.connection import DatabasePool
class DummyOptions: @classmethod def from_dict(cls, _obj) -> "DummyOptions": return DummyOptions()
class StderrOutputService(OutputService): def __init__(self, db: DatabasePool, _options: DummyOptions) -> None: super().__init__("http://localhost", db)
@override def accept_post(self, post: Post): self.log.info("%s", post)
@override def accept_repost(self, repost: PostRef, reposted: PostRef): self.log.info("%s, %s", repost.id, reposted.id)
@override def delete_post(self, post: PostRef): self.log.info("%s", post.id)
@override def delete_repost(self, repost: PostRef): self.log.info("%s", repost.id)