19 lines
534 B
Python
19 lines
534 B
Python
from . import btrfs, mounts
|
|
from .. import defaults, utils
|
|
|
|
|
|
@utils.rpc_callback
|
|
async def callback_func(data, uid):
|
|
# Get operation
|
|
if not isinstance(data, dict):
|
|
raise ValueError("data have to be a object.")
|
|
if "operation" not in data:
|
|
raise ValueError("'operation' isn't set.")
|
|
operation = data["operation"]
|
|
|
|
# Run operation
|
|
raise NotImplementedError()
|
|
|
|
|
|
async def run_deamon(path:str=defaults.DEFAULT_PATH, fork:bool=False):
|
|
await utils.run_access_socket(path, callback_func, fork=fork) |