Comment and breakpoint removal

pull/593/head
Rick Carlino 2017-12-22 11:46:51 -06:00
parent 5a99421d10
commit 420500362b
3 changed files with 4 additions and 15 deletions

View File

@ -13,10 +13,7 @@ module Api
before_action :authenticate_user!
skip_before_action :verify_authenticity_token
after_action :skip_set_cookies_header
# before_action :slow_down
# def slow_down
# sleep 0
# end
rescue_from(User::BadSub) { sorry "Please log out and try again.", 422 }
rescue_from(User::AlreadyVerified) { sorry "Already verified.", 409 }

View File

@ -60,18 +60,10 @@ export function handleCreateOrUpdate(dispatch: Function,
const uuid = maybeDetermineUuid(index, data.kind, data.id);
const isEcho = outstandingRequests.all.has(data.sessionId);
const wow: string[] = [];
outstandingRequests.all.forEach((x) => wow.push(x));
console.dir(wow.join(" "));
fancyDebug({
last: outstandingRequests.last,
isEcho,
sessionId: data.sessionId,
wow
});
if (uuid) {
return isEcho ?
console.log("SKIP") : dispatch(handleUpdate(data, uuid));
undefined : dispatch(handleUpdate(data, uuid));
} else {
// Here be dragons.
// PROBLEM: You see incoming `UPDATE` messages.
@ -85,7 +77,7 @@ export function handleCreateOrUpdate(dispatch: Function,
// by us or some other user. That information lets us know if we are UPDATEing
// data or INSERTing data.
return isEcho ?
console.log("SKIP...") : dispatch(handleCreate(data));
undefined : dispatch(handleCreate(data));
}
}

View File

@ -39,7 +39,7 @@ const MAX_WAIT = 10000;
*
* SOLUTION:
*
* - On all AJAX requests, the API attaches an `X-Farmbot-Sync` header (UUID).
* - On all AJAX requests, the API attaches an `X-Request-Id` header (UUID).
* - On all auto_sync messages, the API attaches the same UUID under
* msg.args.label
* - When FBOS gets an auto_sync message, it replies with an `rpc_ok` message