Giter VIP home page Giter VIP logo

Comments (3)

iangreenleaf avatar iangreenleaf commented on June 27, 2024

Yeah, I can see how this would happen. Probably FTP writes to the file in chunks, or writes to one file and then another - the end result being that node sees a file change notification before FTP has finished its work.

Unfortunately, I don't think there's any way to know when a file "has stopped changing". All node knows is that the file changed just now, and who knows if it will change again in the future.

The delay might be doable - we're actually already waiting for a very short delay (100ms or something) to avoid firing multiple times for git checkouts and CoffeeScript compilations and the like. So if that was configurable you could just set it to something exceptionally long like 30s.

My only qualm about adding that option is increasing code and API complexity for something that's a bit of an edge case. Not saying it's out of the question, just that I want to keep supervisor reasonably lean, which means I'm hesitant to add features unless they're valuable to more than just a couple people.

from node-supervisor.

Onfire7 avatar Onfire7 commented on June 27, 2024

The only way to know if it's done, is to have a loop after detecting the change, that will keep checking it until it stops changing. Kinda undesirable, which is why I threw the bit about the configurable delay.

I kinda figured it would be an edge case, but my thought was that it's the kind of thing that would be annoying enough to be an issue, but not so much that anyone would say anything about it.

from node-supervisor.

iangreenleaf avatar iangreenleaf commented on June 27, 2024

Ah, I see what you had in mind. Yeah, I think a configurable delay would be the way to go. I may leave this open for a bit and see if anyone else mentions this as a problem. I'll edit the title to a bit more descriptive, too.

from node-supervisor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.