Replace in-memory ledger with MongoDB
This commit is contained in:
@@ -11,7 +11,6 @@ dependencies {
|
||||
|
||||
run {
|
||||
environment('RATPACK_DBT__EXECUTOR__REMOTE_URL', findProperty('executorURL').toString() ?: "http://localhost:5050/executor")
|
||||
environment('RATPACK_DBT__EXECUTOR__ENABLED', false)
|
||||
}
|
||||
|
||||
distDocker {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import com.devsoap.dbt.DBTModule
|
||||
import org.h2.jdbcx.JdbcDataSource
|
||||
import com.devsoap.dbt.modules.DBTLedgerModule
|
||||
import com.mongodb.MongoClient
|
||||
import com.mongodb.MongoClientURI
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
import javax.sql.DataSource
|
||||
|
||||
import static ratpack.groovy.Groovy.ratpack
|
||||
|
||||
def log = LoggerFactory.getLogger('dbt-ledger')
|
||||
@@ -15,9 +14,9 @@ ratpack {
|
||||
}
|
||||
|
||||
bindings {
|
||||
module (DBTModule) { config ->
|
||||
log.info "Executor available at $config.executor.remoteUrl"
|
||||
log.info "Ledger available at $config.ledger.remoteUrl"
|
||||
module (DBTLedgerModule) { config ->
|
||||
log.info("Using Mongo database at $config.ledger.databaseUrl")
|
||||
bindInstance(MongoClient, new MongoClient(new MongoClientURI(config.ledger.databaseUrl)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user