mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
ADB connect now respects auth keys in the settings page.
This commit is contained in:
@@ -52,8 +52,20 @@ module.exports = function(conn) {
|
||||
})
|
||||
}
|
||||
|
||||
function createIndex(table, index, fn) {
|
||||
return r.table(table).indexCreate(index, fn).run(conn)
|
||||
function createIndex(table, index, options) {
|
||||
var args = [index]
|
||||
, rTable = r.table(table)
|
||||
|
||||
if (options) {
|
||||
if (options.indexFunction) {
|
||||
args.push(options.indexFunction)
|
||||
}
|
||||
if (options.options) {
|
||||
args.push(options.options)
|
||||
}
|
||||
}
|
||||
|
||||
return rTable.indexCreate.apply(rTable, args).run(conn)
|
||||
.then(function() {
|
||||
log.info('Index "%s"."%s" created', table, index)
|
||||
})
|
||||
@@ -63,7 +75,7 @@ module.exports = function(conn) {
|
||||
})
|
||||
.catch(noMasterAvailableError, function() {
|
||||
return Promise.delay(1000).then(function() {
|
||||
return createIndex(table, index, fn)
|
||||
return createIndex(table, index, options)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user