19 lines
506 B
Python
19 lines
506 B
Python
|
from . import btrfs, mounts, utils
|
||
|
from .. import defaults
|
||
|
|
||
|
|
||
|
@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):
|
||
|
await utils.run_access_socket(path, callback_func)
|