config: support days (d) and weeks (w) in durations

fixes #18
This commit is contained in:
Christian Schwarz
2017-10-05 15:12:50 +02:00
parent 3e647c14c0
commit 83d450b1f2
6 changed files with 52 additions and 40 deletions

View File

@@ -26,6 +26,13 @@ global:
sockdir: /var/run/zrepl/stdinserver
```
## Durations & Intervals
Interval & duration fields in job definitions, pruning configurations, etc. must match the following regex:
```go
var durationStringRegex *regexp.Regexp = regexp.MustCompile(`^\s*(\d+)\s*(s|m|h|d|w)\s*$`)
// s = second, m = minute, h = hour, d = day, w = week (7 days)
```
## Super-Verbose Job Debugging