Skip to content

Commit

Permalink
write_event: use POST api/event background feature to support sqlite
Browse files Browse the repository at this point in the history
With the parameter background, the event is written after the main tx has completed. This works for the specific case to write an event, but e.g. doesn't catch error during save etc. To fix that, we can add a feature to re-use an open tx inside the plugin, but that is for another day.

see #64339
  • Loading branch information
martinrode committed May 5, 2023
1 parent e39756f commit f6f3bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/db_pre_save+write_event/write_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main():
for objecttype in objecttype_count:
util.post_to_api(
api_url=api_url,
path='event',
path='event?background=1',
access_token=access_token,
payload=util.dumpjs({
'event': {
Expand Down

0 comments on commit f6f3bae

Please sign in to comment.