-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix data proxy unsupported before exit event #8274
Fix data proxy unsupported before exit event #8274
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 799fe84:
|
}); | ||
|
||
// beforeExit event is not supported by Prisma Data Proxy | ||
if (!prismaClient._dataProxy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm accessing the internal variable prismaClient._dataProxy
here because the only alternative to check for dataProxy usage would be:
prismaClient.getEngine().constructor.name === 'DataProxyEngine'
// to ensure that the process is cleaned up appropriately. | ||
prismaClient._engine.child?.kill('SIGINT'); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need this still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unable to replicate the original issue (#5477) if I remove this whole prismaClient.$on
block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drop it
Moved changes over to #8347 - Closing the PR... thanks @mmachatschek |
This is based on the branch of PR #7964 as I tested all prisma versions from 4.3.1 (current keystone supported version) to 4.9.0. Earlier versions had problems with parsing the
prisma://
database urls