Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Trigger failsafe if many reloads are triggered #54

Open
Tsourdox opened this issue May 29, 2020 · 2 comments
Open

Trigger failsafe if many reloads are triggered #54

Tsourdox opened this issue May 29, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Tsourdox
Copy link

Tsourdox commented May 29, 2020

Not sure if this is the correct way to do it, but I wanted to save a cache script I could easily run.

"cache": {
      "desc": "Cache versions and update lock file",
      "cmd": "deno cache server.ts --lock-write",
      "lock": "./lock.json"
}

The result however when running denon cache is an endless loop instead of just executing it once, looks like this:

Skärmavbild 2020-05-29 kl  19 10 40

Now is this a bug or aren't you suppose to add and execute scripts in this way?

@eliassjogreen
Copy link
Member

You need to ignore ./lock.json, otherwise it will detect the changes made to it and restart in an infinite loop.

"watcher": {
    "skip": ["./lock.json"]
}

When stuck in an infinite loop you most likely aren't skipping the right files or directory.

@notfilippo
Copy link
Collaborator

Probably we should add a failsafe for infinite loops if they happen within a short (and configurable) timespan. Marking this as a feature.

@notfilippo notfilippo added enhancement New feature or request good first issue Good for newcomers labels May 29, 2020
@notfilippo notfilippo added this to the 2.1.0 milestone May 29, 2020
@notfilippo notfilippo changed the title Adding a cache script to the denon.json file Failsafe for reload loops Jun 1, 2020
@notfilippo notfilippo modified the milestones: 2.1.0, 2.2.0 Jun 5, 2020
@notfilippo notfilippo changed the title Failsafe for reload loops Trigger failsafe if many reloads are triggered Jun 27, 2020
@notfilippo notfilippo modified the milestones: 2.3.0, future Jul 26, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants