This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POSTGRESQL_VERSION="9.2.1" | |
| # Installing DB (one-time) | |
| cd $OPENSHIFT_DATA_DIR | |
| wget http://ftp.postgresql.org/pub/source/v${POSTGRESQL_VERSION}/postgresql-${POSTGRESQL_VERSION}.tar.gz | |
| tar xf postgresql-${POSTGRESQL_VERSION}.tar.gz | |
| rm postgresql-${POSTGRESQL_VERSION}.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use 'clojure.core.async) | |
| (defn req [server query] | |
| (go | |
| (<! (timeout (rand-int 100))) | |
| (str query " from " server))) | |
| (defn fastest [query & servers] | |
| (let [c (chan)] | |
| (doseq [server servers] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Any - because everything in zio is private even diagnostic trait | |
| class StreamDiagnostics(val queue: Queue[Any]) extends LogSupport { | |
| val map = TrieMap.empty[String, Promise[Throwable, Unit]] | |
| def runWithMonitor[R](tp: TopicPartition, stream: ZStream[R, Throwable, _]): ZIO[R, Throwable, Unit] = | |
| for { | |
| p <- Promise.make[Throwable, Unit] | |
| _ <- queue.offer(StreamControl(tp, p)) | |
| fb <- stream |