-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(functions-load-balancing): fix functions build
- Loading branch information
1 parent
9e5c261
commit c9e8133
Showing
8 changed files
with
585 additions
and
255 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import * as functions from 'firebase-functions'; | ||
import * as admin from "firebase-admin"; | ||
|
||
admin.initializeApp(); | ||
|
||
if (!process.env.FUNCTION_NAME || process.env.FUNCTION_NAME === 'onOnlineGameStatusUpdate') { | ||
exports.onOnlineGameStatusUpdate = require('./load-balancing/onOnlineGameStatusUpdate').onOnlineGameStatusUpdate; | ||
} | ||
|
||
if (!process.env.FUNCTION_NAME || process.env.FUNCTION_NAME === 'selectBestRTDBInstance') { | ||
exports.selectBestRTDBInstance = require('./load-balancing/selectBestRTDBInstance').selectBestRTDBInstance; | ||
} | ||
|
||
if (!process.env.FUNCTION_NAME || process.env.FUNCTION_NAME === 'scheduledSyncStatusJob') { | ||
exports.scheduledSyncStatusJob = require('./load-balancing/syncStatusJob').scheduledSyncStatusJob; | ||
} | ||
|
||
// Start writing Firebase Functions | ||
// https://firebase.google.com/docs/functions/typescript | ||
|
||
export const helloWorld = functions.https.onRequest((request, response) => { | ||
functions.logger.info("Hello logs!", {structuredData: true}); | ||
response.send("Hello from Firebase!"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
export const RTDB_THRESHOLD = 100; // TODO compute carefully | ||
export const RTDB_LOCATION = 'europe-west1'; | ||
|
||
export const end = () => { | ||
return new Promise<void>(resolve => { | ||
resolve(); | ||
}); | ||
}; | ||
|