cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.8k stars 128 forks source link

Add --maxrestart argument to change max deamon restart delay #91

Open wader opened 4 years ago

wader commented 4 years ago

Fixes #90

wader commented 4 years ago

Maybe there is some better way of passing around maxRestartDelay?

wader commented 4 years ago

--maxrestart might be confusing name, could --maxrestartdelay be better but a bit long?

Maybe it would make sense if the option is per daemon instead but not sure about syntax, something like daemon 3s: ...? or extend the syntax to key=value so something like daemon maxrestartdelay=3: ...? should be a global option also, @maxrestartdelay=3?

atombender commented 4 years ago

--maxdelay or --maxbackoffdelay?

I'd love to get this merged.

wader commented 4 years ago

@cortesi let me if you think it should be done in different way

pavel-kolesnikov commented 3 years ago

Hi @wader . I'm working on #101 (fixes #86 & #55, hopefully). May be the maxrestart could be implemented like the mentioned silence directive, per block also. WDYT?

wader commented 3 years ago

@pavel-kolesnikov hello! yes could be an option, then it would configure it for all daemons in that block? i've thought about having the option per daemon which is nice as it make it very clear what it is used for.

pavel-kolesnikov commented 3 years ago

1.

@pavel-kolesnikov hello! yes could be an option, then it would configure it for all daemons in that block? i've thought about having the option per daemon which is nice as it make it very clear what it is used for.

Basically, per Block. Like this:

** {
  silence: 1s
  prep: echo "no more then once a second"
}
  1. Hmmmm... Option per daemon is nice also. But then extensive lexer rework needed, I think. At least 2 options:

    • extend daemons to blocks themselves (and we inventing YAML\JSON here)
    • develop something like +k:v (and again, inventing wheel :( )
wader commented 3 years ago

Nice summary. Opt 2 would also follow how +sigterm etc works now