paulmillr / chokidar

Minimal and efficient cross-platform file watching library
https://paulmillr.com
MIT License
10.8k stars 574 forks source link

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

Closed niirdan closed 2 months ago

niirdan commented 6 months ago

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):