Unverified Commit 957fae15 authored by Vitalii Koshura's avatar Vitalii Koshura

Merge branches 'delta1513-solved-3360' and 'Rytiss-sched_op' into upstream_master

Signed-off-by: default avatarVitalii Koshura <lestat.de.lionkur@gmail.com>
...@@ -465,7 +465,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() { ...@@ -465,7 +465,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
p = next_project_sched_rpc_pending(); p = next_project_sched_rpc_pending();
if (p) { if (p) {
if (log_flags.sched_op_debug) { if (log_flags.sched_op_debug) {
msg_printf(p, MSG_INFO, "sched RPC pending: %s", msg_printf(p, MSG_INFO, "[sched_op] sched RPC pending: %s",
rpc_reason_string(p->sched_rpc_pending) rpc_reason_string(p->sched_rpc_pending)
); );
} }
...@@ -664,7 +664,7 @@ int CLIENT_STATE::handle_scheduler_reply( ...@@ -664,7 +664,7 @@ int CLIENT_STATE::handle_scheduler_reply(
if (log_flags.sched_op_debug && sr.request_delay) { if (log_flags.sched_op_debug && sr.request_delay) {
msg_printf(project, MSG_INFO, msg_printf(project, MSG_INFO,
"Project requested delay of %.0f seconds", sr.request_delay "[sched_op] Project requested delay of %.0f seconds", sr.request_delay
); );
} }
...@@ -690,7 +690,7 @@ int CLIENT_STATE::handle_scheduler_reply( ...@@ -690,7 +690,7 @@ int CLIENT_STATE::handle_scheduler_reply(
if (gstate.acct_mgr_info.using_am() && p && q && !strcmp(p, q)) { if (gstate.acct_mgr_info.using_am() && p && q && !strcmp(p, q)) {
if (log_flags.sched_op_debug) { if (log_flags.sched_op_debug) {
msg_printf(project, MSG_INFO, msg_printf(project, MSG_INFO,
"ignoring prefs from project; using prefs from AM" "[sched_op] ignoring prefs from project; using prefs from AM"
); );
} }
} else if (!global_prefs.host_specific || sr.scheduler_version >= 507) { } else if (!global_prefs.host_specific || sr.scheduler_version >= 507) {
...@@ -707,7 +707,7 @@ int CLIENT_STATE::handle_scheduler_reply( ...@@ -707,7 +707,7 @@ int CLIENT_STATE::handle_scheduler_reply(
} else { } else {
if (log_flags.sched_op_debug) { if (log_flags.sched_op_debug) {
msg_printf(project, MSG_INFO, msg_printf(project, MSG_INFO,
"ignoring prefs from old server; we have host-specific prefs" "[sched_op] ignoring prefs from old server; we have host-specific prefs"
); );
} }
} }
......
...@@ -87,7 +87,7 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) { ...@@ -87,7 +87,7 @@ static bool find_host_by_other(DB_USER& user, HOST req_host, DB_HOST& host) {
for (unsigned int i=0; i < config.dont_search_host_for_userid.size(); i++) { for (unsigned int i=0; i < config.dont_search_host_for_userid.size(); i++) {
if (user.id == config.dont_search_host_for_userid[i]) { if (user.id == config.dont_search_host_for_userid[i]) {
return false; return false;
} }
} }
// Only check if all the fields are populated // Only check if all the fields are populated
...@@ -1416,12 +1416,13 @@ void process_request(char* code_sign_key) { ...@@ -1416,12 +1416,13 @@ void process_request(char* code_sign_key) {
if (config.min_sendwork_interval) { if (config.min_sendwork_interval) {
double diff = dtime() - last_rpc_time; double diff = dtime() - last_rpc_time;
if (diff < config.min_sendwork_interval) { if (diff < config.min_sendwork_interval) {
double t_left = config.min_sendwork_interval - diff;
ok_to_send_work = false; ok_to_send_work = false;
log_messages.printf(MSG_NORMAL, log_messages.printf(MSG_NORMAL,
"Not sending work - last request too recent: %f\n", diff "Not sending work - last request too recent, please wait: %f\n", t_left
); );
sprintf(buf, sprintf(buf,
"Not sending work - last request too recent: %d sec", (int)diff "Not sending work - last request too recent, please wait: %d sec", (int)t_left
); );
g_reply->insert_message(buf, "low"); g_reply->insert_message(buf, "low");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment