import asyncio
from typing import Sequence


class AbstractIOQueueOperation(object):
    """
    The file operations must not block the main async-loop thread, so these are invoked on worker threads by the queue.
    """

    OPERATION_KEY: str = None

    # @classmethod
    # def invoke(cls, *args, **kwargs):
    #     with cls(*args, **kwargs) as self:
    #         return self.execute()

    def __init__(self, account_id: int):
        self.account_id = account_id
        self.op_future: asyncio.Future = None

    def paths(self) -> Sequence[str]:
        raise NotImplementedError()

    def execute(self):
        raise NotImplementedError()
