Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datastore: GAE prod and dev support for datastore #154

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
datastore: GAE dev/prod support minor styling fixes.
  • Loading branch information
rakyll committed Sep 2, 2014
commit 7a60eb38f230df9324e83d474d8bf526b770a202
4 changes: 2 additions & 2 deletions lib/common/gae.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

var gae = {};

gae.info = function() {
gae.getInfo = function() {
if (process.env.GAE_LONG_APP_ID) {
return {
id: process.env.GAE_LONG_APP_ID,
id: process.env.GAE_LONG_APP_ID,
isProd: process.env.GAE_VM !== undefined
};

This comment was marked as spam.

This comment was marked as spam.

}
Expand Down
2 changes: 1 addition & 1 deletion lib/datastore/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var SCOPES = [
function Dataset(options) {
options = options || {};

var gaeInfo = gae.info();
var gaeInfo = gae.getInfo();
this.id = options.projectId;
if (gaeInfo) {
this.id = gaeInfo.id;
Expand Down
2 changes: 1 addition & 1 deletion lib/datastore/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Transaction.prototype.makeReq = function(method, req, respType, callback) {
// TODO: Handle non-HTTP 200 cases.
callback = callback || util.noop;

var gaeInfo = gae.info();
var gaeInfo = gae.getInfo();
var host = GOOGLE_APIS_HOST;
if (gaeInfo && !gaeInfo.isProd) {
host = GOOGLE_APIS_DEV_HOST;
Expand Down