增加缓存并发查询和更新的统计,并增加熔断机制。

This commit is contained in:
zhengchao
2018-10-21 20:09:23 +08:00
parent c5f5ee2655
commit 9290dd0e0f
3 changed files with 54 additions and 8 deletions

View File

@@ -137,7 +137,7 @@ void tfe_proxy_free(tfe_proxy * ctx)
static void __dummy_event_handler(evutil_socket_t fd, short what, void * arg)
{
printf("%s alive\n",__FUNCTION__);
//printf("%s alive\n",__FUNCTION__);
return;
}
@@ -191,7 +191,7 @@ static void * tfe_work_thread(void * arg)
ctx->running = 1;
__currect_thread_id = ctx->thread_id;
char thread_name[16];
snprintf(thread_name, sizeof(thread_name), "tfe:worker%d", ctx->thread_id);
snprintf(thread_name, sizeof(thread_name), "tfe:worker-%d", ctx->thread_id);
prctl(PR_SET_NAME,(unsigned long long)thread_name,NULL,NULL,NULL);
TFE_LOG_INFO(g_default_logger, "Work thread %u is running...", ctx->thread_id);