This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
Replies: 1 comment
-
Hey @maxbry. One thing you could do is using models.DB to start a new transaction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
in my requests, some things need to be stored in the database for logging reasons. I would like to do this in goroutines because this can happen concurrently:
I noticed that somethings the goroutine wanted to access the database after the original request had been finished. The tx seems to could not have been usable anymore. What is the best practice in this case? Should I create a new database connection inside the goroutine?
Beta Was this translation helpful? Give feedback.
All reactions