There are two fundamental stages in Patroni:
- bootstrap
- running the cluster
In the bootstrap stage, Patroni will:
Dieser Gist wurde hierhin migriert: https://github.com/tpo/31c3_talks_annotations/
| #!/usr/bin/ruby | |
| # tested with ruby 1.9.3p194 | |
| puts "this will not print" if defined?(x) | |
| if false | |
| puts "this neither" | |
| x = "foobar" | |
| end |
| # for a long time I wondered why Ruby didn't have Pascal's "WITH" | |
| # construct. It's completely trivial to implent though... | |
| def with object, &block | |
| object.instance_eval(&block) | |
| end | |
| # now instead of needing to name your object all the time: | |
| object = Object.new |