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

Improved documentation for transaction handling in jobs #1487

Open
ketain opened this issue Apr 5, 2024 · 0 comments
Open

Improved documentation for transaction handling in jobs #1487

ketain opened this issue Apr 5, 2024 · 0 comments

Comments

@ketain
Copy link

ketain commented Apr 5, 2024

Is your feature request related to a problem? Please describe.
The current documentation regarding transactions in jobs boils down to "We've got you covered, Don't sweet it." Which is actually not helpful.

Describe the solution you'd like
We know, through the documentation, that each request gets its own transaction which is commited to the DB upon response.

Something similarly explicit would be helpful for jobs.
For example:

  • Does a job started during a request share the same transaction as the request? If so, does the transaction wait for the completion of the job before being closed (even if it runs longer thena the request lasts)?
  • Cron Jobs get their own transactions.
  • Jobs started from within Jobs get their very own new transaction. The transaction of the parent job gets closed independently upon completion of the parent job.
  • Jobs started with afterRequest() get their own transaction.

Additional context
I am using Play for years and this is still something I am not sure about. So the above may be wrong. Hence this ticket.

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

1 participant