Document database/fluent access from inside dequeue
antonyharfield opened this issue · 7 comments
Could we add an example to the readme on how to access the database/fluent from the job please?
I haven't figured out what the best way would be... can we pass in a DatabaseConnectable as service? or is it possible to extend the JobContext to be DatabaseConnectable?
(If you have some examples then I would be willing to document it in the readme.)
Sorry about that - the README is out of date as everything is in pre-release. This is a good place to find the updated docs: vapor/docs#389
Regarding the database connection, I pass in container.pooledConnection(to: .mysql) (I’m on mobile so that might not be the correct syntax.)
Thanks @mcdappdev. The updated docs worked for me!
Awesome!
@mcdappdev can we get the readme updated though? I'm planning on referencing this package in my upcoming book, so it would be nice to not have the readers look through these issues for them to find the link to the documentation ;)
@proggeramlug I’m actually going to get rid of the readme soon to match the style of the other Vapor repos. All stuff will be in that docs PR
Oh yeah absolutely, once the docs are live this readme will have a link just like all of the others