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

Document database/fluent access from inside dequeue #9

Closed
antonyharfield opened this issue Mar 15, 2019 · 7 comments
Closed

Document database/fluent access from inside dequeue #9

antonyharfield opened this issue Mar 15, 2019 · 7 comments

Comments

@antonyharfield
Copy link

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.)

@jdmcd
Copy link
Member

jdmcd commented Mar 15, 2019

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.)

@jdmcd jdmcd closed this as completed Mar 15, 2019
@antonyharfield
Copy link
Author

Thanks @mcdappdev. The updated docs worked for me!

@jdmcd
Copy link
Member

jdmcd commented Mar 16, 2019

Awesome!

@proggeramlug
Copy link

@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 ;)

@jdmcd
Copy link
Member

jdmcd commented May 12, 2019

@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

@proggeramlug
Copy link

proggeramlug commented May 12, 2019 via email

@jdmcd
Copy link
Member

jdmcd commented May 12, 2019

Oh yeah absolutely, once the docs are live this readme will have a link just like all of the others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants