diff options
author | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-03 14:25:32 +0000 |
---|---|---|
committer | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-03 14:25:32 +0000 |
commit | ab6e28417a9195fe03b8355a808a81276d0435ff (patch) | |
tree | 3bf903f2dea07ac27b7de2168e76182ce0974a0c /longboat | |
parent | 220ebc31c057bbf47eec1cccbbae8b3cf2190d24 (diff) |
Added command line config
Diffstat (limited to 'longboat')
-rwxr-xr-x | longboat | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -3,11 +3,14 @@ $LOAD_PATH << './lib' require 'longboat' -collector = Longboat::Collector.new +# Handle command line options +config = Longboat::Config.parse! -jobs = Longboat::Jobs.new -jobs.load(collector) +# Start collection +collector = Longboat::Collector.new +jobs = Longboat::Jobs.new(collector, config) +jobs.load! t = jobs.collect_every -require 'longboat/server' -Longboat::Server.serve!(collector) +# Serve metrics on HTTP +Longboat::Server.serve!(collector, config) |