dragon.workflows.batch.batch.BatchFile
- class BatchFile[source]
Bases:
object- __init__(batch, *args, **kwargs) None [source]
Initialize a batch file object. This object adds a little logic on top of a normal file to guarantee that previous (according to client program order) updates to the file are complete before the client accesses the file. This is only necessary when background batching is enabled.
- Parameters:
batch (Batch) – The batch whose tasks will update the ddict.
- Returns:
Returns None.
- Return type:
None
Methods
__init__(batch, *args, **kwargs)Initialize a batch file object.
read(*args, **kwargs)Performs a batch fence before reading from the file.
read1(*args, **kwargs)Performs a batch fence before reading from the file.
readall(*args, **kwargs)Performs a batch fence before reading from the file.
readinto(*args, **kwargs)Performs a batch fence before reading from the file.
readinto1(*args, **kwargs)Performs a batch fence before reading from the file.
readline(*args, **kwargs)Performs a batch fence before reading from the file.
readlines(*args, **kwargs)Performs a batch fence before reading from the file.
write(*args, **kwargs)Performs a batch fence before writing to the file.
writelines(*args, **kwargs)Performs a batch fence before writing to the file.
- __init__(batch, *args, **kwargs) None [source]
Initialize a batch file object. This object adds a little logic on top of a normal file to guarantee that previous (according to client program order) updates to the file are complete before the client accesses the file. This is only necessary when background batching is enabled.
- Parameters:
batch (Batch) – The batch whose tasks will update the ddict.
- Returns:
Returns None.
- Return type:
None
- read(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- read1(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- readline(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- readlines(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- readall(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- readinto(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any
- readinto1(*args, **kwargs) Any [source]
Performs a batch fence before reading from the file.
- Returns:
Returns the data read from the file.
- Return type:
Any