PublishHistoryStorage#
- class stixcore.processing.publish.PublishHistoryStorage(filename)[source]#
Bases:
objectPersistent handler for meta data on already published files.
Methods Summary
add(path)Adds a new file to the history.
close()Close the IDB connection.
count()Counts the number of entries in the DB
find_by_esa_name(esa_name)Finds all history entries based on the the ESA name (not unique).
find_by_name(name)Finds a history entry based on the file name (unique constraint).
get_all()Queries all entries
Is the handler connected to the db file.
set_modified_esa_name(name, id)Updates the modified ESA file name of an entry.
set_result(result, id)Sets the result of a publishing action for a given file.
Methods Documentation
- add(path)[source]#
Adds a new file to the history.
- Parameters:
path (path like object) – path to the FITS file to be published
- Returns:
(
PublishConflicts,list) – PublishConflicts with already published files and a list of all “conflicting files” including the newly added files as last entry.
- find_by_esa_name(esa_name)[source]#
Finds all history entries based on the the ESA name (not unique).
- set_result(result, id)[source]#
Sets the result of a publishing action for a given file.
- Parameters:
result (
PublishResult) – the resultid (
int) – the id of the entry to update
- Returns:
hash– the update result