tomwer.core.process.control.scantransfer.ScanTransferTask#
- class tomwer.core.process.control.scantransfer.ScanTransferTask(varinfo=None, inputs=None, node_id=None, node_attrs=None, execinfo=None)#
Manage the copy of scan.
- static definition()#
definition of the process
- static getDefaultOutputDir()#
Return the default output dir based on the computer setup
- getDestinationDir(scanPath, ask_for_output=True)#
Return the destination directory. The destination directory is the root directory
- getOutput(scan)#
- Parameters:
scan –
- Returns:
- handle_nexus_file(src_nexus_file, entry)#
Return a tuple of three elemts: src_nexus_file, files_sources_for_nx, files_dest_for_nx
- Parameters:
src_nexus_file (
str
) – source file to treat- Return type:
tuple
- Returns:
(dst_nexus_file, files_sources_for_nx, files_dest_for_nx) * dst_nexus_file: str -> output nexus file that will be created by the transfer * list files_sources_for_nx: list of relative files connected to source nexus file * files_dest_for_nx: list of creating files from files_sources_for_nx once transfer is accomplish
- isCopying()#
- Returns:
True if the folder transfert is actually doing a copy
- static program_name()#
Name of the program used for this processing
- static program_version()#
version of the program used for this processing
- run()#
Launch the process process
- Parameters:
scan – the path to the file we want to move/process
move – if True, directly move the files. Otherwise copy the files
overwrite – if True then force the copy even if the file/folder already exists
noRSync – True if we wan’t do sue shutil instead of rsync.
- scanready = <tomwer.core.signal.Signal object>#
emit when scan ready
- setDestDir(dist)#
Force the outpudir to dist.
- Parameters:
dist – path to the folder. If None remove overwrite behavior
- setForceSync(b)#
- Parameters:
b – if True then folderTransfert will wait until transfert is done to be released. Otherwise will launch a ‘free’ thread wich will notice transfert end later.
- set_configuration(properties)#
- signalTransfertOk(input_scan, output_scan)#