Page MenuHomePhorge

Log job start (partial)
AcceptedPublic

Authored by machniak on Tue, Oct 22, 2:22 PM.

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
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
Branch
dev/log-jobs
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 50811
Build 18486: arc lint + arc unit

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.Tue, Oct 22, 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.