Page MenuHomePhorge

Log job start (partial)
ClosedPublic

Authored by machniak on Oct 22 2024, 2:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 11, 10:01 AM
Unknown Object (File)
Mon, Feb 10, 7:54 PM
Unknown Object (File)
Sat, Feb 8, 1:06 AM
Unknown Object (File)
Sat, Feb 8, 1:06 AM
Unknown Object (File)
Sat, Feb 8, 1:06 AM
Unknown Object (File)
Fri, Feb 7, 11:56 PM
Unknown Object (File)
Fri, Feb 7, 3:54 PM
Unknown Object (File)
Fri, Feb 7, 2:50 PM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rKfde824a7ea96: Log job start (partial)
Summary

A way to log job execution.

I tried using Laravel event system to do this more magically (from one place),
but the events do not give easy access to job data.

Implemented only for User and Wallet jobs for now.

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
mollekopf subscribed.

Looks good. I suppose you tried something like this: https://git.kolab.org/rKa3448e46572c9bcba39702689d31e77bfeaa1d26, but it didn't give access to the email/walletId?

This revision is now accepted and ready to land.Oct 22 2024, 3:56 PM

No, I tried registering handlers for Queue::JobProcessing and Queue::jobProcessed events via AppServiceProvider::boot(). The handlers were triggered, but the job object there is not the same as our job, and access to the job data requires instantiating the actual job from a serialized object string. Possible, but ugly.

This revision was automatically updated to reflect the committed changes.