Db tools
| FUNCTION | DESCRIPTION |
|---|---|
bulk_upsert_image_cache_fast |
Insert or update many objects into |
update_executor_error_log_safe |
Update |
Classes¶
Functions:¶
bulk_upsert_image_cache_fast(*, list_upsert_objects, db)
¶
Insert or update many objects into HistoryImageCache and commit
This function is an optimized version of
See docs at https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#insert-on-conflict-upsert
NOTE: we tried to replace index_elements with
constraint="pk_historyimagecache", but it did not work as expected.
| PARAMETER | DESCRIPTION |
|---|---|
|
List of dictionaries for objects to be upsert-ed. |
|
A sync database session
TYPE:
|
Source code in fractal_server/runner/v2/db_tools.py
update_executor_error_log_safe(*, job_id, executor_error_log, db)
¶
Update JobV2.executor_error_log with a DataError fallback.