mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Ignore watch timeout when not user request. (#1604)
This commit is contained in:
@@ -481,6 +481,7 @@ protected:
|
||||
virtual CommMessageOut *message_out();
|
||||
virtual CommMessageIn *message_in();
|
||||
virtual int keep_alive_timeout();
|
||||
virtual int first_timeout();
|
||||
virtual bool init_success();
|
||||
virtual bool finish_once();
|
||||
|
||||
@@ -652,6 +653,11 @@ int ComplexHttpProxyTask::keep_alive_timeout()
|
||||
return this->ComplexHttpTask::keep_alive_timeout();
|
||||
}
|
||||
|
||||
int ComplexHttpProxyTask::first_timeout()
|
||||
{
|
||||
return is_user_request_ ? this->watch_timeo : 0;
|
||||
}
|
||||
|
||||
bool ComplexHttpProxyTask::init_success()
|
||||
{
|
||||
if (!uri_.scheme || strcasecmp(uri_.scheme, "http") != 0)
|
||||
|
||||
@@ -45,6 +45,7 @@ protected:
|
||||
virtual CommMessageOut *message_out();
|
||||
virtual CommMessageIn *message_in();
|
||||
virtual int keep_alive_timeout();
|
||||
virtual int first_timeout();
|
||||
virtual bool init_success();
|
||||
virtual bool finish_once();
|
||||
|
||||
@@ -523,6 +524,11 @@ int ComplexMySQLTask::keep_alive_timeout()
|
||||
return MYSQL_KEEPALIVE_DEFAULT;
|
||||
}
|
||||
|
||||
int ComplexMySQLTask::first_timeout()
|
||||
{
|
||||
return is_user_request_ ? this->watch_timeo : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
+--------------------+---------------------+-----+
|
||||
| CHARACTER_SET_NAME | COLLATION_NAME | ID |
|
||||
|
||||
@@ -47,6 +47,7 @@ protected:
|
||||
virtual CommMessageOut *message_out();
|
||||
virtual CommMessageIn *message_in();
|
||||
virtual int keep_alive_timeout();
|
||||
virtual int first_timeout();
|
||||
virtual bool init_success();
|
||||
virtual bool finish_once();
|
||||
|
||||
@@ -142,6 +143,11 @@ int ComplexRedisTask::keep_alive_timeout()
|
||||
return succ_ ? REDIS_KEEPALIVE_DEFAULT : 0;
|
||||
}
|
||||
|
||||
int ComplexRedisTask::first_timeout()
|
||||
{
|
||||
return is_user_request_ ? this->watch_timeo : 0;
|
||||
}
|
||||
|
||||
bool ComplexRedisTask::init_success()
|
||||
{
|
||||
enum TransportType type;
|
||||
|
||||
Reference in New Issue
Block a user