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

synchronous issues when using database operations when 'add' function is triggered #1308

Open
niirdan opened this issue Feb 18, 2024 · 0 comments

Comments

@niirdan
Copy link

niirdan commented Feb 18, 2024

Describe the bug
I am building a tool which receive files, and whenever there's an incoming file - i am calling db for crud operations. mongodb-atlas,
using mongoose.
looks like I can't force chokidar to wait until db operation finishes until serving the new incoming file (case when many files comes at once)
tried many configuration setting , non solved my issue
I am Sure that there's a solution but i can't understand how ..

Versions (please complete the following information):

  • Chokidar version 3.5.3
  • Node version v18.17.1
  • OS version: windows 11

Steps to reproduce the behavior. Include filename and chokidar config.
ignoreInitial: true,
ignorePermissionErrors: true,
awaitWriteFinish: true,
binaryInterval: 10000
** I use the Unwatch() func to unlisten from a file by the end of each operation . **
Expected behavior
force chokidar to actually wait until db operations finishes and then serve the next file (when receive more than 2-3 files at once)
** Current Behavior**
duplications in db operations - code is running to fast and db cannot detect an existing entry on time.

@niirdan niirdan changed the title mongoose(mongodb) operation database operations when 'add' function is triggered Feb 18, 2024
@niirdan niirdan changed the title database operations when 'add' function is triggered synchronous issues when using database operations when 'add' function is triggered Feb 18, 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

No branches or pull requests

1 participant