CNG: Ruby-ize dependencies check in wait-for-deps
Between the above, and Ruby actually having
kernel.exec(I didn't know), it becomes suddenly much more feasible to replace this entire script with Ruby, and thread the various checks.
- (Re)starts Ruby as few times as possible, loading as few modules as possible.
wait-for-deps script spins a loop:
checkSchemaVersion(), which fires up
- If that passes muster, then run
- If that too passes muster, continue via
- If either of the above fail, start again.
wait-for-deps prepares the environment, and calls
rails-dependencies. This is a Ruby script which internally Threads the functionality of
rails-db-check. This is handled in such a way that Ruby is instantiated once, and configuration files are read once. Each module is responsible for their own execution and looping pattern based upon configuration from environment, as provided by