Closed novellat closed 4 months ago
Possibly firing on overlapping triggers.
What's the actual impact of the problem you're seeing?
On Fri, 26 Jul 2024, 10:41 novellat, @.***> wrote:
- Versions: @., @.
- nodemon -v: 3.1.4
- Operating system/terminal environment (powershell, gitshell, etc): zsh on mac
- Using Docker? What image: no
- Command you ran:
const nodemon = require('nodemon');
nodemon({ ext: 'js, jsx, ts, tsx, json, md', ignore: ['node_modules'], watch: ['./plugins'], exec: 'echo changed?????', }).on('restart', (...args) => { console.log('CHANGE!!!!!!', args[0]); });
Expected behaviour
expected the numbe of "changed?????" to be equal to "CHANGE!!!!!!". Actual behaviour
But there's more restart events than the script calls.
— Reply to this email directly, view it on GitHub https://github.com/remy/nodemon/issues/2213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADLBECMDR7YT5SITXFVR3ZOIKVDAVCNFSM6AAAAABLQFYFHWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTCOBUGQ3TCNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The main thing is that I need to exec some relatively long running command on changes and would like to minimize the number of executions. So mostly performance impact (why run my long running command more than necessary)
What do you mean by overlapping triggers? I only have this one nodemon script running
Actually, feel free to close the ticket. I made a workaround around my problem - basically triggered several nodemons on different directories and then the whole logic is more straightforward and I don't need to any shenannigans like this, just a simple nodemon calls.
nodemon -v
: 3.1.4Expected behaviour
expected the numbe of "changed?????" to be equal to "CHANGE!!!!!!".
Actual behaviour
But there's more restart events than the script calls.