-
Notifications
You must be signed in to change notification settings - Fork 139
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
on('created') event is triggered twice #63
Comments
+1 |
I use |
I'm seeing the same issue. How can I use setTimeout to resolve it? |
@MatthewCodes This is the issue in node repo: nodejs/node-v0.x-archive#1970 I create an array to store all changed files, and I filter out duplicated files by using changedFiles.indexOf(). |
+1 I'm using it to import xml files into a db. I used a que for the new files and then removed the duplicate before triggering the import that has throttling to limit the amount of memory used. Partial code below to give you an idea. que.push(path);
que = uniqueArr(que); // return array of unique values
setTimeout(function() {
_import();
}, timeout);
...
function _import () {
if (!que.length || process_count >= process_max) { return; }
var file = que.shift();
... // process file
_import ();
} |
same issue with watch.watchTree |
Hi there !
Like the title say so, my
"ceated"
event gets triggered twice and I can't seem to figure out why.Here is a sample code:
When a new document is created, I see the log print twice.
Has anyone an idea on how could I fix this ?
The text was updated successfully, but these errors were encountered: