Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run model auditing observer as job #562

Open
prodigy7 opened this issue Nov 12, 2019 · 2 comments
Open

Run model auditing observer as job #562

prodigy7 opened this issue Nov 12, 2019 · 2 comments
Assignees

Comments

@prodigy7
Copy link

Q A
Bug? no
New Feature? yes
Framework Laravel
Framework version 6.x
Package version 9.x
PHP version 7.x

Actual Behaviour

Currently, when a model is changed, the observer was directly triggered.

Expected Behaviour

I wish a optional configurable behaviour, that a audit record is written by a job. Problem in my case is, that I am working with a big amount of data. I want audit any change but it's ok, when it's done some seconds later. In this situation I want win some time by move the auditing process to background.

Steps to Reproduce

Take existing model, change something and save.

Possible Solutions

Implement current observer auditing code into own class and call it directly or with job

@applyACS
Copy link

applyACS commented Aug 5, 2021

I'm having the same issue. I'd like to run audit as a job.

@MortenDHansen MortenDHansen self-assigned this Feb 8, 2022
@MortenDHansen
Copy link
Contributor

I see the value of the idea. A bunch of operations could be pushed back doing this. Maybe let the observer trigger a new event that could queue for doing the actual work.

We will look into it

This was referenced Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants