Add global concurrency parameter. fix #56

Fix bug which caused pending actions to be run multiple times when pending time finished
Fix bug which caused
1. past pending actions to rerun on exit
2. maximum one pending action per pattern/action couple to run on exit
This commit is contained in:
ppom
2024-01-05 12:00:00 +01:00
parent 9ce589b07d
commit b441e91f84
7 changed files with 83 additions and 43 deletions

View File

@ -21,6 +21,11 @@ local iptables(args) = ['ip46tables', '-w'] + args;
},
},
// if set to a positive number → max number of concurrent actions
// if set to a negative number → no limit
// if not specified or set to 0 → defaults to the number of CPUs on the system
concurrency: 0,
// Those commands will be executed in order at start, before everything else
start: [
// Create an iptables chain for reaction