Skip to content

Commit

Permalink
Cherry picked d591598
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAspens authored and lfield committed Mar 6, 2020
1 parent 77405e5 commit e0adb58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions sched/handle_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,10 +1418,12 @@ void process_request(char* code_sign_key) {
if (diff < config.min_sendwork_interval) {
ok_to_send_work = false;
log_messages.printf(MSG_NORMAL,
"Not sending work - last request too recent: %f\n", diff
"Not sending work. Last request too recent. Please wait %d seconds.\n",
(int)(config.min_sendwork_interval - diff)
);
sprintf(buf,
"Not sending work - last request too recent: %d sec", (int)diff
"Not sending work. Last request too recent. Please wait %d seconds.\n",
(int)(config.min_sendwork_interval - diff)
);
g_reply->insert_message(buf, "low");

Expand Down
4 changes: 3 additions & 1 deletion sched/sched_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ inline bool daily_quota_exceeded(DB_ID_TYPE gavid, HOST_USAGE& hu) {
}

bool daily_quota_exceeded(BEST_APP_VERSION* bavp) {
return daily_quota_exceeded(bavp->avp->id, bavp->host_usage);
DB_HOST_APP_VERSION* havp = bavp->host_app_version();
if (!havp) return false;
return daily_quota_exceeded(havp->app_version_id, bavp->host_usage);
}

// scan through client's anonymous apps and pick the best one
Expand Down

0 comments on commit e0adb58

Please sign in to comment.