summaryrefslogtreecommitdiff
path: root/lib/oxidized/core.rb
AgeCommit message (Collapse)Author
2018-09-12add a new line after guard clauses for better visual flow (#1520)Wild Kat
2018-04-21the great makeover - standardize layout, alignment, indentationWild Kat
2016-06-02more debug stratementsElvin Efendi
2015-12-13refactor and fix bugs introduced with new changesElvin Efendi
2015-11-13better test framework, more specs and Travis CIElvin Efendi
2015-09-12Fix FloatDomainError when 0 nodes are foundSaku Ytti
Oxidized would throw: ---- /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/jobs.rb:36:in `to_i': NaN (FloatDomainError) from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/jobs.rb:36:in `new_count' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/jobs.rb:28:in `duration' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/jobs.rb:16:in `initialize' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/worker.rb:7:in `new' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/worker.rb:7:in `initialize' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/core.rb:21:in `new' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/core.rb:21:in `initialize' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/core.rb:12:in `new' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/core.rb:12:in `new' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/lib/oxidized/cli.rb:9:in `run' from /var/lib/gems/2.1.0/gems/oxidized-0.7.2/bin/oxidized:9:in `<top (required)>' from /usr/local/bin/oxidized:23:in `load' from /usr/local/bin/oxidized:23:in `<main>' --- When nodes.size == 0, this may happen when you have say one node in router.db which has non-existing model. Actual problem happens in jobs.rb: @duration = @durations.inject(:+).to_f / @nodes.size ... @want = ((@nodes.size * @duration) / @interval).to_i Simplified: a = 0.0 / 0 b = a.to_i
2015-08-28Initial implementation of the hook featureAnton Aksola
The current implementation is modular and allows users to define hooks in several ways: * Use one of the built-in hook types (currently only 'exec') * Define their own Hook classes inside ~/.config/oxidized/hook Exec hook type runs a user defined command with or without shell. It populates a bunch of environment variables with metadata. The command can either be run as synchronous or asynchronous. The default is synchronous.
2015-02-26Fixing formattingFlorian Hibler
2015-02-26Fixing HUP trapFlorian Hibler
2015-02-24kill -hup reloads nodesSaku Ytti
2014-07-14core.rb: Improve error messageRichard Hartmann
2014-07-13Explain how to disable oxidized-web if load errorSaku Ytti
Ratioinale is, we want to keep it default, but it should be easy for people to understand what to do, if they don't want it. Closes #17
2014-05-06require config/vars earlier0.0.56Saku Ytti
- we need config/vars before model - some whitespace changes Bump up gemspec
2014-05-05missing editsAnton Aksola
2014-04-17Asetus values will always be trueSaku Ytti
2014-04-16We rescue 'LoadError' in ManagerSaku Ytti
Let's raise OxidizedError instead for known dependencies
2014-04-16remove web APISaku Ytti
It is now separately in oxidized-web package
2014-04-15Use String subclass in model#cmdSaku Ytti
Will allow convenience methods such as cmd :all do |cfg| cfg.pop.shift end instead of: cmd :all do |cfg| cfg.each_line.to_a[1..-2].join end And what ever convenience configs we come up with
2014-04-14Use 'asetus' for configuration filesSaku Ytti
Main benefits a) we get support for system wide configs b) we don't use symbols in config file, they're confusing to non-rubyist
2014-02-23Fix sleep and return ability to not run rest/webSaku Ytti
2014-02-23Migrate to sinatra/puma from webrickSaku Ytti
As I can't do IO#select on sinatra/puma to run it when I have time, I have to run it on separate thread. This means Nodes container needs to be thread safe, it now has ghetto mutex locking, but I probably need to be be more focused what are the external methods that can be called and wrap those in @mutex.synchronize Provide also HTML UI not just JSON for ghetto UI to people who don't want to integrate
2013-04-19Add restful APISaku Ytti
2013-04-17Initial commitSaku Ytti
Silly for shit-and-giggles attempt at rancid