prefect.results
Functions
DEFAULT_STORAGE_KEY_FN
aget_default_result_storage
get_default_result_storage
aresolve_result_storage
ResultStorage
input types into a saved block
document id and an instance of the block.
resolve_result_storage
ResultStorage
input types into a saved block
document id and an instance of the block.
resolve_serializer
ResultSerializer
input types into a serializer
instance.
get_or_create_default_task_scheduling_storage
get_default_result_serializer
get_default_persist_setting
get_default_persist_setting_for_tasks
should_persist_result
results.persist_by_default
on the
current settings will be returned.
default_cache
result_storage_discriminator
get_result_store
Classes
ResultStore
Manages the storage and retrieval of results.
Methods:
aacquire_lock
key
: The key to acquire the lock for.holder
: The holder of the lock. If not provided, a default holder based on the current host, process, and thread will be used.timeout
: The timeout for the lock.
- True if the lock was successfully acquired; False otherwise.
acquire_lock
key
: The key to acquire the lock for.holder
: The holder of the lock. If not provided, a default holder based on the current host, process, and thread will be used.timeout
: The timeout for the lock.
- True if the lock was successfully acquired; False otherwise.
aexists
key
: The key to check for the existence of a result record.
- True if the result record exists, False otherwise.
apersist_result_record
result_record
: The result record to persist.
aread
key
: The key to read the result record from.holder
: The holder of the lock if a lock was set on the record.
- A result record.
await_for_lock
awrite
key
: The key to write the result record to.obj
: The object to write to storage.expiration
: The expiration time for the result record.holder
: The holder of the lock if a lock was set on the record.
create_result_record
key
: The key to create the result record for.obj
: The object to create the result record for.expiration
: The expiration time for the result record.
exists
key
: The key to check for the existence of a result record.
- True if the result record exists, False otherwise.
generate_default_holder
- A unique identifier string.
is_lock_holder
key
: The key to check the lock for.holder
: The holder of the lock. If not provided, a default holder based on the current host, process, and thread will be used.
- True if the current holder is the lock holder; False otherwise.
is_locked
persist_result_record
result_record
: The result record to persist.
read
key
: The key to read the result record from.holder
: The holder of the lock if a lock was set on the record.
- A result record.
read_parameters
release_lock
key
: The key to release the lock for.holder
: The holder of the lock. Must match the holder that acquired the lock. If not provided, a default holder based on the current host, process, and thread will be used.
result_storage_block_id
store_parameters
supports_isolation_level
level
: The isolation level to check.
- True if the isolation level is supported, False otherwise.
update_for_flow
flow
: The flow to update the result store for.
- An updated result store.
update_for_task
task
: The task to update the result store for.
- An updated result store.
wait_for_lock
write
ResultRecord
and its serialization to storage.
Args:
key
: The key to write the result record to.obj
: The object to write to storage.expiration
: The expiration time for the result record.holder
: The holder of the lock if a lock was set on the record.