-
Notifications
You must be signed in to change notification settings - Fork 31
Expose more about job using metadata #158
base: master
Are you sure you want to change the base?
Expose more about job using metadata #158
Conversation
@basz What do you think about this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
We could -eventually- consider adding an interface exposing these additions? 🤷♂️ DoctrineJobInterface extends https://github.com/JouwWeb/SlmQueue/blob/master/src/Job/JobInterface.php |
@basz Mm. When I read your post that made sense. But.. now I am implementing it, it does not seem to work. The I think the path I initially took is still our best bet. Although that does feel somewhat hacky .. |
Ok. But,... We don't need to force users to use it. They may use an DoctrineJobInterface on their Jobs. The JobManager doesn't care... Still returns JobInterfaces. I agree it would mainly be for IDE code completion... |
@basz The way I am intending to use this feature is to track how long it took before a job gets executed, after it's scheduled date has passed. That will however only give a proper reading if all jobs implement this. And this fails to work if you import a job that depends on SlmQueue from another repo. But I do get your point... What if we do both?
I think that is an enhancement to my original proposal. And... maybe also what you meant initially? |
sounds decent! 👍 |
This PR extends the DoctrineQueue to publish
scheduled
andpriority
. Previously onlyid
got exposed to the outside world.My use-case is that I would like to add a strategy that can send the time it took before the job started to an outside monitoring system.