Skip to content

Commit

Permalink
consistent thread names
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Jul 27, 2023
1 parent 12e473b commit 1b3deb6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions quick_backup_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def do_copy(src: str, dst: str):
return

futures = []
with ThreadPoolExecutor(max_workers=config.concurrent_copy_workers, thread_name_prefix='QBMFileCopier') as pool:
with ThreadPoolExecutor(max_workers=config.concurrent_copy_workers, thread_name_prefix='QBM_FileCopier') as pool:
def concurrent_copy(src: str, dst: str):
futures.append(pool.submit(do_copy, src, dst))

Expand Down Expand Up @@ -321,7 +321,7 @@ def wrap(source: CommandSource, *args, **kwargs):
return wrapper


@new_thread('QBM - delete')
@new_thread('QBM_Delete')
@single_op(tr('operations.delete'))
def delete_backup(source: CommandSource, slot: int):
if slot_check(source, slot) is None:
Expand All @@ -334,7 +334,7 @@ def delete_backup(source: CommandSource, slot: int):
print_message(source, tr('delete_backup.success', slot), tell=False)


@new_thread('QBM - rename')
@new_thread('QBM_Rename')
@single_op(tr('operations.rename'))
def rename_backup(source: CommandSource, slot: int, comment: str):
ret = slot_check(source, slot)
Expand Down Expand Up @@ -396,7 +396,7 @@ def clean_up_slot_1():
return False


@new_thread('QBM - create')
@new_thread('QBM_Create')
def create_backup(source: CommandSource, comment: Optional[str]):
_create_backup(source, comment)

Expand Down Expand Up @@ -471,7 +471,7 @@ def restore_backup(source: CommandSource, slot: int):
)


@new_thread('QBM - restore')
@new_thread('QBM_Restore')
def confirm_restore(source: CommandSource):
global slot_selected
if slot_selected is None:
Expand Down Expand Up @@ -532,7 +532,7 @@ def trigger_abort(source: CommandSource):
print_message(source, tr('trigger_abort.abort'), tell=False)


@new_thread('QBM - list')
@new_thread('QBM_List')
def list_backup(source: CommandSource, size_display: bool = None):
if size_display is None:
size_display = config.size_display
Expand Down Expand Up @@ -578,7 +578,7 @@ def format_dir_size(size: int):
print_message(source, tr('list_backup.total_space', format_dir_size(total_backup_size)), prefix='')


@new_thread('QBM - help')
@new_thread('QBM_Help')
def print_help_message(source: CommandSource):
if source.is_player:
source.reply('')
Expand Down

0 comments on commit 1b3deb6

Please sign in to comment.