diff options
author | Maxim Devaev <[email protected]> | 2022-07-23 11:02:00 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-07-24 05:38:26 +0300 |
commit | baeb2bc35b82ea12777100d70156e74fb162325a (patch) | |
tree | 94d78670a9dcaeb4db1dd238960bd34fb0609c52 /kvmd | |
parent | 44ffe83199b464f7515eee7a850d360522b826e2 (diff) |
upload_chunk_size -> write_chunk_size
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/plugins/msd/otg/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index 29694ed3..dde50fa1 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -136,7 +136,7 @@ class _State: class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes def __init__( # pylint: disable=super-init-not-called self, - upload_chunk_size: int, + write_chunk_size: int, sync_chunk_size: int, storage_path: str, @@ -148,7 +148,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes gadget: str, # XXX: Not from options, see /kvmd/apps/kvmd/__init__.py for details ) -> None: - self.__upload_chunk_size = upload_chunk_size + self.__write_chunk_size = write_chunk_size self.__sync_chunk_size = sync_chunk_size self.__storage_path = os.path.normpath(storage_path) @@ -175,7 +175,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes @classmethod def get_plugin_options(cls) -> Dict: return { - "upload_chunk_size": Option(65536, type=functools.partial(valid_number, min=1024)), + "write_chunk_size": Option(65536, type=functools.partial(valid_number, min=1024)), "sync_chunk_size": Option(4194304, type=functools.partial(valid_number, min=1024)), "storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"), @@ -340,7 +340,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes self.__writer = await MsdImageWriter(path, size, self.__sync_chunk_size).open() await self.__notifier.notify() - yield self.__upload_chunk_size + yield self.__write_chunk_size self.__set_image_complete(name, True) finally: |