如何避免hockeyapp.Feedback(null,null,true,{data:1,...})
Node.Js模块在超时时退出?
我收到此错误:
neo4j-javascript-driver
我不想让这个时间到位。
答案 0 :(得分:0)
您可以定义自己的超时,如下所示:
import Neo4j from "neo4j-driver";
// create driver
const driver = Neo4j.driver(`bolt://host:port`, Neo4j.auth.basic(user, password),{
encrypted: 'ENCRYPTION_OFF',
maxConnectionLifetime: 3 * 60 * 60 * 1000, // 3 hours
maxConnectionPoolSize: 150
});
// create session
const s = driver.session();
// transaction
r = await s.writeTransaction(tx => f(tx), {
timeout: 99999999 // define timeout
});