You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functions / methods store_entity and upload_file return an object that has a change_id property
It would be neat to have an attribute of OSW/OswExpress that collects all change_ids of applicable processes
A context manager or a function decorated with @atexit.register from atexit would be required for implementation
At exit, the change_ids could be printed to the console
At exit, a file could be created, documenting the session with start and end time and list the change_ids.
The start time could be the file name
The default location for such a file could be the osw_files directory
At the moment change_ids can be collected and preseved like this:
stored= []
# Storing an entity requires only one line:res=osw_obj.store_entity(john)
# But to be able to access all storage event later on, we will append the result to the liststored.append(res)
change_ids= [res.change_idforresinstored]
withopen(filepath, "w", enconding="utf-8) asfile:
file.write({
"session_start": timestamp1,
"session_end": timestamp2,
"change_ids": change_ids
})
This is rather lengthy and must be considered before making changes to an OSL instance
The text was updated successfully, but these errors were encountered:
Idea
@atexit.register
from atexit would be required for implementationAt the moment change_ids can be collected and preseved like this:
This is rather lengthy and must be considered before making changes to an OSL instance
The text was updated successfully, but these errors were encountered: