one goroutine handles all actions

pending actions are now data, they're not goroutines anymore ❤️

warn: cli currently doesn't work, but it's already a huge commit
This commit is contained in:
ppom
2023-09-22 18:09:31 +02:00
parent 52556f69b9
commit a119e0814b
4 changed files with 117 additions and 48 deletions

View File

@ -5,17 +5,17 @@ patterns:
streams:
tailDown:
cmd: [ "sh", "-c", "sleep 2; echo found 1; echo found 2; sleep 2" ]
cmd: [ "sh", "-c", "sleep 0.5; echo found 1; sleep 1; echo found 1; sleep 10" ]
filters:
findIP:
regex:
- '^found <num>$'
retry: 2
retry-period: 2m
retry-period: 1m
actions:
damn:
cmd: [ "echo", "<num>" ]
undamn:
cmd: [ "echo", "undamn", "<num>" ]
after: 1m
after: 5s
onexit: true