mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 16:43:26 +02:00
Reap dead devices using timeouts. Previously, if a provider died without being able to clean up properly, the device would stay as a ghost.
This commit is contained in:
@@ -33,8 +33,15 @@ db.connect = (function() {
|
||||
}
|
||||
})()
|
||||
|
||||
// Close connection, we don't really care if it hasn't been created yet or not
|
||||
db.close = function() {
|
||||
return db.connect().then(function(conn) {
|
||||
return rutil.close(conn)
|
||||
})
|
||||
}
|
||||
|
||||
// Small utility for running queries without having to acquire a connection
|
||||
db.run = function(q) {
|
||||
db.run = function(q, options) {
|
||||
return db.connect().then(function(conn) {
|
||||
return rutil.run(conn, q)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user