Skip to content

Conversation

leonardovida
Copy link
Contributor

As discussed with @igorbenav, this PR closes #138.

I took the freedom to marginally expand the documentation and rationale of using ARQ Job Queues and added a small h4 section on dealing with a database session.

On a semi-related note, another aspect we could futher explore is dealing with Pydantic objects in these tasks, as ARQ does not deal with them correctly due to serialization. Some approaches require you to cast them back to Pydantic (your_object = YourObjectPydanticClass(**your_object_dict_from_db) some just deal with them as dictionaries. Might be useful to point users to a best practice?

On a less-related note, @igorbenav I'd love to contribute more and have some ideas to improve the project I'd like to explore. Feel free to drop me a note using my email on my profile.

@igorbenav
Copy link
Collaborator

Nice one, @leonardovida! Thanks
I'll send you an email

@igorbenav igorbenav merged commit a19a185 into benavlabs:main Jun 2, 2024
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

Successfully merging this pull request may close these issues.

DB session from a worker function?
2 participants