dsfd
This commit is contained in:
@@ -15,6 +15,18 @@ class SeleniumBrowser {
|
||||
}
|
||||
this.capabilities = Capabilities.chrome()
|
||||
this.sleep = m => new Promise(r => setTimeout(r, m))
|
||||
setInterval(this.createPool, 1000 * 60)
|
||||
}
|
||||
|
||||
reCreatePool() {
|
||||
this.pool.drain().then(() => {
|
||||
return this.pool.clear()
|
||||
}).then(() => {
|
||||
this.createPool()
|
||||
})
|
||||
}
|
||||
|
||||
createPool() {
|
||||
this.pool = pool.createPool({
|
||||
create: () => {
|
||||
logger.info('Create new driver instance')
|
||||
|
||||
Reference in New Issue
Block a user