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
AuditEventStreamingWorker
to either expect an id or a json string ofAuditEvent
instance. This will enable us to build anAuditEvent
(not save it) and stream it to the destination.
Proposal
- Modify
AuditEventStreamingWorker
to accept either anid
of anaudit_event
in the database or json string of an instance ofAuditEvent
. - We can then use
AuditEvents::AuditEventStreamingWorker.perform_async(nil, audit_event_json)
to stream theaudit_event
that is not saved in the database.
Edited by Harsimar Sandhu