Enable streaming of audit events without the need to save them to database
Description
- This issue has been created as a result of this comment.
- We need to allow the
AuditEventStreamingWorkerto either expect an id or a json string ofAuditEventinstance. This will enable us to build anAuditEvent(not save it) and stream it to the destination.
Proposal
- Modify
AuditEventStreamingWorkerto accept either anidof anaudit_eventin the database or json string of an instance ofAuditEvent. - We can then use
AuditEvents::AuditEventStreamingWorker.perform_async(nil, audit_event_json)to stream theaudit_eventthat is not saved in the database.
Edited by Harsimar Sandhu