From a7ae6794e8196e85b0dd679713611c778b755c91 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 31 Mar 2026 09:19:56 +0900 Subject: [PATCH 1/4] =?UTF-8?q?chore:=20Firebase=20Functions=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Firebase/functions/package-lock.json | 8 ++++---- Firebase/functions/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firebase/functions/package-lock.json b/Firebase/functions/package-lock.json index 93e60a66..5f839b66 100644 --- a/Firebase/functions/package-lock.json +++ b/Firebase/functions/package-lock.json @@ -10,7 +10,7 @@ "axios": "^1.9.0", "dotenv": "^16.5.0", "firebase-admin": "^12.6.0", - "firebase-functions": "^7.0.5", + "firebase-functions": "^7.2.2", "jsonwebtoken": "^9.0.2" }, "devDependencies": { @@ -3145,9 +3145,9 @@ "license": "MIT" }, "node_modules/firebase-functions": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-7.0.5.tgz", - "integrity": "sha512-uG2dR5AObLuUrWWjj/de5XxNHCVi+Ehths0DSRcLjHJdgw1TSejwoZZ5na6gVrl3znNjRdBRy5Br5UlhaIU3Ww==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-7.2.2.tgz", + "integrity": "sha512-fWFVI+4weuaat+Fp+4xYY1T+omiTvya8fW79+edgLWCOaDEBSBNlfhstnt+K1esblscZlJf8v+IA0LsCG8Uf1Q==", "license": "MIT", "dependencies": { "@types/cors": "^2.8.5", diff --git a/Firebase/functions/package.json b/Firebase/functions/package.json index f6930575..f5fe7f8e 100644 --- a/Firebase/functions/package.json +++ b/Firebase/functions/package.json @@ -18,7 +18,7 @@ "axios": "^1.9.0", "dotenv": "^16.5.0", "firebase-admin": "^12.6.0", - "firebase-functions": "^7.0.5", + "firebase-functions": "^7.2.2", "jsonwebtoken": "^9.0.2" }, "devDependencies": { From fc8edf9132c2454d97071d761b5235a3f5864cc5 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 31 Mar 2026 10:08:13 +0900 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=EC=98=81=ED=96=A5=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=88=98=EC=A4=80=EC=97=90=EC=84=9C=20maxInstances?= =?UTF-8?q?=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Firebase/functions/src/auth/apple.ts | 8 ++++---- Firebase/functions/src/auth/github.ts | 4 ++-- Firebase/functions/src/fcm/notification.ts | 1 + Firebase/functions/src/fcm/schedule.ts | 1 + Firebase/functions/src/notification/deletion.ts | 5 +++-- Firebase/functions/src/todo/cleanup.ts | 3 +++ Firebase/functions/src/todo/deletion.ts | 5 +++-- Firebase/functions/src/todo/update.ts | 1 + Firebase/functions/src/todoCategory/update.ts | 2 ++ Firebase/functions/src/webPage/deletion.ts | 5 +++-- 10 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Firebase/functions/src/auth/apple.ts b/Firebase/functions/src/auth/apple.ts index 3e9dc953..132e05e5 100644 --- a/Firebase/functions/src/auth/apple.ts +++ b/Firebase/functions/src/auth/apple.ts @@ -54,7 +54,7 @@ function getAppleConfiguration() { export const requestAppleCustomToken = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { @@ -142,7 +142,7 @@ export const requestAppleCustomToken = onCall({ export const requestAppleRefreshToken = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { if (!request.auth) { @@ -186,7 +186,7 @@ export const requestAppleRefreshToken = onCall({ export const refreshAppleAccessToken = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { // 인증 확인 @@ -267,7 +267,7 @@ export const refreshAppleAccessToken = onCall({ export const revokeAppleAccessToken = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { // 인증 확인 diff --git a/Firebase/functions/src/auth/github.ts b/Firebase/functions/src/auth/github.ts index 19a0391f..d1fc7b05 100644 --- a/Firebase/functions/src/auth/github.ts +++ b/Firebase/functions/src/auth/github.ts @@ -5,7 +5,7 @@ import axios from "axios"; // GitHub OAuth 인증 및 커스텀 토큰 발급 함수 export const requestGithubTokens = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { @@ -103,7 +103,7 @@ export const requestGithubTokens = onCall({ export const revokeGithubAccessToken = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { diff --git a/Firebase/functions/src/fcm/notification.ts b/Firebase/functions/src/fcm/notification.ts index 279da8ac..b51d01ef 100644 --- a/Firebase/functions/src/fcm/notification.ts +++ b/Firebase/functions/src/fcm/notification.ts @@ -18,6 +18,7 @@ type FirestoreErrorLike = { // Cloud Tasks에 의해 트리거되는 함수 export const sendPushNotification = onTaskDispatched({ + maxInstances: 2, region: "asia-northeast3", retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 200 }, diff --git a/Firebase/functions/src/fcm/schedule.ts b/Firebase/functions/src/fcm/schedule.ts index 72945c9b..be79585f 100644 --- a/Firebase/functions/src/fcm/schedule.ts +++ b/Firebase/functions/src/fcm/schedule.ts @@ -25,6 +25,7 @@ type ErrorLike = { }; export const scheduleTodoReminder = onSchedule({ + maxInstances: 2, region: LOCATION, schedule: "*/5 * * * *", timeZone: "UTC" diff --git a/Firebase/functions/src/notification/deletion.ts b/Firebase/functions/src/notification/deletion.ts index 13a6620e..c544841a 100644 --- a/Firebase/functions/src/notification/deletion.ts +++ b/Firebase/functions/src/notification/deletion.ts @@ -16,7 +16,7 @@ type NotificationDeletionTaskData = { export const requestPushNotificationDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -94,7 +94,7 @@ export const requestPushNotificationDeletion = onCall({ export const undoPushNotificationDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -147,6 +147,7 @@ export const undoPushNotificationDeletion = onCall({ ); export const completePushNotificationDeletion = onTaskDispatched({ + maxInstances: 2, region: LOCATION, retryConfig: {maxAttempts: 3, minBackoffSeconds: 5}, rateLimits: {maxDispatchesPerSecond: 200}, diff --git a/Firebase/functions/src/todo/cleanup.ts b/Firebase/functions/src/todo/cleanup.ts index 881a0173..7280c41a 100644 --- a/Firebase/functions/src/todo/cleanup.ts +++ b/Firebase/functions/src/todo/cleanup.ts @@ -8,6 +8,7 @@ const DELETE_BATCH_SIZE = 200; const QUERY_BATCH_SIZE = 100; export const removeTodoNotificationDocuments = onDocumentDeleted({ + maxInstances: 2, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, @@ -29,6 +30,7 @@ export const removeTodoNotificationDocuments = onDocumentDeleted({ ); export const removeCompletedTodoNotificationRecords = onDocumentUpdated({ + maxInstances: 2, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, @@ -64,6 +66,7 @@ export const removeCompletedTodoNotificationRecords = onDocumentUpdated({ ); export const cleanupUnusedTodoNotificationRecords = onSchedule({ + maxInstances: 2, region: LOCATION, schedule: "0 * * * *", timeZone: "UTC" diff --git a/Firebase/functions/src/todo/deletion.ts b/Firebase/functions/src/todo/deletion.ts index 2490a0a7..de8e4940 100644 --- a/Firebase/functions/src/todo/deletion.ts +++ b/Firebase/functions/src/todo/deletion.ts @@ -17,7 +17,7 @@ type TodoDeletionTaskData = { export const requestTodoDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -105,7 +105,7 @@ export const requestTodoDeletion = onCall({ export const undoTodoDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -163,6 +163,7 @@ export const undoTodoDeletion = onCall({ ); export const completeTodoDeletion = onTaskDispatched({ + maxInstances: 2, region: LOCATION, retryConfig: {maxAttempts: 3, minBackoffSeconds: 5}, rateLimits: {maxDispatchesPerSecond: 200}, diff --git a/Firebase/functions/src/todo/update.ts b/Firebase/functions/src/todo/update.ts index 930869be..27aa1263 100644 --- a/Firebase/functions/src/todo/update.ts +++ b/Firebase/functions/src/todo/update.ts @@ -7,6 +7,7 @@ const LOCATION = "asia-northeast3"; const BATCH_SIZE = 200; export const syncTodoNotificationCategory = onDocumentUpdated({ + maxInstances: 2, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, diff --git a/Firebase/functions/src/todoCategory/update.ts b/Firebase/functions/src/todoCategory/update.ts index 1aee0eb6..ff605c55 100644 --- a/Firebase/functions/src/todoCategory/update.ts +++ b/Firebase/functions/src/todoCategory/update.ts @@ -21,6 +21,7 @@ type TodoCategoryUpdateTaskData = { }; export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated({ + maxInstances: 2, document: "users/{userId}/userData/categories", region: LOCATION }, @@ -80,6 +81,7 @@ export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated({ ); export const completeMoveRemovedCategoryTodosToEtc = onTaskDispatched({ + maxInstances: 2, region: LOCATION, retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 20 }, diff --git a/Firebase/functions/src/webPage/deletion.ts b/Firebase/functions/src/webPage/deletion.ts index 52145449..6c04b6e9 100644 --- a/Firebase/functions/src/webPage/deletion.ts +++ b/Firebase/functions/src/webPage/deletion.ts @@ -17,7 +17,7 @@ type WebPageDeletionTaskData = { export const requestWebPageDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -101,7 +101,7 @@ export const requestWebPageDeletion = onCall({ export const undoWebPageDeletion = onCall({ cors: true, - maxInstances: 10, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -163,6 +163,7 @@ export const undoWebPageDeletion = onCall({ ); export const completeWebPageDeletion = onTaskDispatched({ + maxInstances: 2, region: LOCATION, retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 200 }, From a4be34ae10148e8f93753e07b56ad2b789ee7347 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 31 Mar 2026 11:28:47 +0900 Subject: [PATCH 3/4] =?UTF-8?q?test:=20onCall:=202=20/=20=EB=82=98?= =?UTF-8?q?=EB=A8=B8=EC=A7=80=EB=8A=94=201=EB=A1=9C=20maxInstances=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Firebase/functions/src/auth/apple.ts | 8 ++++---- Firebase/functions/src/auth/github.ts | 4 ++-- Firebase/functions/src/fcm/notification.ts | 2 +- Firebase/functions/src/fcm/schedule.ts | 2 +- Firebase/functions/src/notification/deletion.ts | 6 +++--- Firebase/functions/src/todo/cleanup.ts | 6 +++--- Firebase/functions/src/todo/deletion.ts | 6 +++--- Firebase/functions/src/todo/update.ts | 2 +- Firebase/functions/src/todoCategory/update.ts | 4 ++-- Firebase/functions/src/user/delete.ts | 3 +++ Firebase/functions/src/webPage/deletion.ts | 6 +++--- 11 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Firebase/functions/src/auth/apple.ts b/Firebase/functions/src/auth/apple.ts index 132e05e5..ae0ec7ce 100644 --- a/Firebase/functions/src/auth/apple.ts +++ b/Firebase/functions/src/auth/apple.ts @@ -54,7 +54,7 @@ function getAppleConfiguration() { export const requestAppleCustomToken = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { try { @@ -142,7 +142,7 @@ export const requestAppleCustomToken = onCall({ export const requestAppleRefreshToken = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { if (!request.auth) { @@ -186,7 +186,7 @@ export const requestAppleRefreshToken = onCall({ export const refreshAppleAccessToken = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { // 인증 확인 @@ -267,7 +267,7 @@ export const refreshAppleAccessToken = onCall({ export const revokeAppleAccessToken = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { // 인증 확인 diff --git a/Firebase/functions/src/auth/github.ts b/Firebase/functions/src/auth/github.ts index d1fc7b05..73fb2464 100644 --- a/Firebase/functions/src/auth/github.ts +++ b/Firebase/functions/src/auth/github.ts @@ -5,7 +5,7 @@ import axios from "axios"; // GitHub OAuth 인증 및 커스텀 토큰 발급 함수 export const requestGithubTokens = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { try { @@ -103,7 +103,7 @@ export const requestGithubTokens = onCall({ export const revokeGithubAccessToken = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: "asia-northeast3", }, async (request) => { try { diff --git a/Firebase/functions/src/fcm/notification.ts b/Firebase/functions/src/fcm/notification.ts index b51d01ef..1f8d5a5e 100644 --- a/Firebase/functions/src/fcm/notification.ts +++ b/Firebase/functions/src/fcm/notification.ts @@ -18,7 +18,7 @@ type FirestoreErrorLike = { // Cloud Tasks에 의해 트리거되는 함수 export const sendPushNotification = onTaskDispatched({ - maxInstances: 2, + maxInstances: 1, region: "asia-northeast3", retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 200 }, diff --git a/Firebase/functions/src/fcm/schedule.ts b/Firebase/functions/src/fcm/schedule.ts index be79585f..1ce79c00 100644 --- a/Firebase/functions/src/fcm/schedule.ts +++ b/Firebase/functions/src/fcm/schedule.ts @@ -25,7 +25,7 @@ type ErrorLike = { }; export const scheduleTodoReminder = onSchedule({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, schedule: "*/5 * * * *", timeZone: "UTC" diff --git a/Firebase/functions/src/notification/deletion.ts b/Firebase/functions/src/notification/deletion.ts index c544841a..11b90379 100644 --- a/Firebase/functions/src/notification/deletion.ts +++ b/Firebase/functions/src/notification/deletion.ts @@ -16,7 +16,7 @@ type NotificationDeletionTaskData = { export const requestPushNotificationDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -94,7 +94,7 @@ export const requestPushNotificationDeletion = onCall({ export const undoPushNotificationDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -147,7 +147,7 @@ export const undoPushNotificationDeletion = onCall({ ); export const completePushNotificationDeletion = onTaskDispatched({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, retryConfig: {maxAttempts: 3, minBackoffSeconds: 5}, rateLimits: {maxDispatchesPerSecond: 200}, diff --git a/Firebase/functions/src/todo/cleanup.ts b/Firebase/functions/src/todo/cleanup.ts index 7280c41a..fcc1031c 100644 --- a/Firebase/functions/src/todo/cleanup.ts +++ b/Firebase/functions/src/todo/cleanup.ts @@ -8,7 +8,7 @@ const DELETE_BATCH_SIZE = 200; const QUERY_BATCH_SIZE = 100; export const removeTodoNotificationDocuments = onDocumentDeleted({ - maxInstances: 2, + maxInstances: 1, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, @@ -30,7 +30,7 @@ export const removeTodoNotificationDocuments = onDocumentDeleted({ ); export const removeCompletedTodoNotificationRecords = onDocumentUpdated({ - maxInstances: 2, + maxInstances: 1, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, @@ -66,7 +66,7 @@ export const removeCompletedTodoNotificationRecords = onDocumentUpdated({ ); export const cleanupUnusedTodoNotificationRecords = onSchedule({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, schedule: "0 * * * *", timeZone: "UTC" diff --git a/Firebase/functions/src/todo/deletion.ts b/Firebase/functions/src/todo/deletion.ts index de8e4940..a3f7af55 100644 --- a/Firebase/functions/src/todo/deletion.ts +++ b/Firebase/functions/src/todo/deletion.ts @@ -17,7 +17,7 @@ type TodoDeletionTaskData = { export const requestTodoDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -105,7 +105,7 @@ export const requestTodoDeletion = onCall({ export const undoTodoDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -163,7 +163,7 @@ export const undoTodoDeletion = onCall({ ); export const completeTodoDeletion = onTaskDispatched({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, retryConfig: {maxAttempts: 3, minBackoffSeconds: 5}, rateLimits: {maxDispatchesPerSecond: 200}, diff --git a/Firebase/functions/src/todo/update.ts b/Firebase/functions/src/todo/update.ts index 27aa1263..d08996ea 100644 --- a/Firebase/functions/src/todo/update.ts +++ b/Firebase/functions/src/todo/update.ts @@ -7,7 +7,7 @@ const LOCATION = "asia-northeast3"; const BATCH_SIZE = 200; export const syncTodoNotificationCategory = onDocumentUpdated({ - maxInstances: 2, + maxInstances: 1, document: "users/{userId}/todoLists/{todoId}", region: LOCATION }, diff --git a/Firebase/functions/src/todoCategory/update.ts b/Firebase/functions/src/todoCategory/update.ts index ff605c55..2052c6d1 100644 --- a/Firebase/functions/src/todoCategory/update.ts +++ b/Firebase/functions/src/todoCategory/update.ts @@ -21,7 +21,7 @@ type TodoCategoryUpdateTaskData = { }; export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated({ - maxInstances: 2, + maxInstances: 1, document: "users/{userId}/userData/categories", region: LOCATION }, @@ -81,7 +81,7 @@ export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated({ ); export const completeMoveRemovedCategoryTodosToEtc = onTaskDispatched({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 20 }, diff --git a/Firebase/functions/src/user/delete.ts b/Firebase/functions/src/user/delete.ts index 006085a4..8cfa69d4 100644 --- a/Firebase/functions/src/user/delete.ts +++ b/Firebase/functions/src/user/delete.ts @@ -3,6 +3,9 @@ import * as admin from "firebase-admin"; import * as logger from "firebase-functions/logger"; export const cleanupDeletedUserFirestoreData = functions + .runWith({ + maxInstances: 1 + }) .region("asia-northeast3") .auth .user() diff --git a/Firebase/functions/src/webPage/deletion.ts b/Firebase/functions/src/webPage/deletion.ts index 6c04b6e9..c944e8c2 100644 --- a/Firebase/functions/src/webPage/deletion.ts +++ b/Firebase/functions/src/webPage/deletion.ts @@ -17,7 +17,7 @@ type WebPageDeletionTaskData = { export const requestWebPageDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -101,7 +101,7 @@ export const requestWebPageDeletion = onCall({ export const undoWebPageDeletion = onCall({ cors: true, - maxInstances: 3, + maxInstances: 2, region: LOCATION, }, async (request) => { @@ -163,7 +163,7 @@ export const undoWebPageDeletion = onCall({ ); export const completeWebPageDeletion = onTaskDispatched({ - maxInstances: 2, + maxInstances: 1, region: LOCATION, retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 200 }, From a911f0fb8313f4c4fce67c4faac815a00452ac7b Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 31 Mar 2026 12:09:24 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20maxInstance=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Firebase/functions/src/auth/apple.ts | 8 ++++---- Firebase/functions/src/auth/github.ts | 4 ++-- Firebase/functions/src/fcm/notification.ts | 2 +- Firebase/functions/src/notification/deletion.ts | 4 ++-- Firebase/functions/src/todo/deletion.ts | 4 ++-- Firebase/functions/src/webPage/deletion.ts | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Firebase/functions/src/auth/apple.ts b/Firebase/functions/src/auth/apple.ts index ae0ec7ce..132e05e5 100644 --- a/Firebase/functions/src/auth/apple.ts +++ b/Firebase/functions/src/auth/apple.ts @@ -54,7 +54,7 @@ function getAppleConfiguration() { export const requestAppleCustomToken = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { @@ -142,7 +142,7 @@ export const requestAppleCustomToken = onCall({ export const requestAppleRefreshToken = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { if (!request.auth) { @@ -186,7 +186,7 @@ export const requestAppleRefreshToken = onCall({ export const refreshAppleAccessToken = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { // 인증 확인 @@ -267,7 +267,7 @@ export const refreshAppleAccessToken = onCall({ export const revokeAppleAccessToken = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { // 인증 확인 diff --git a/Firebase/functions/src/auth/github.ts b/Firebase/functions/src/auth/github.ts index 73fb2464..d1fc7b05 100644 --- a/Firebase/functions/src/auth/github.ts +++ b/Firebase/functions/src/auth/github.ts @@ -5,7 +5,7 @@ import axios from "axios"; // GitHub OAuth 인증 및 커스텀 토큰 발급 함수 export const requestGithubTokens = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { @@ -103,7 +103,7 @@ export const requestGithubTokens = onCall({ export const revokeGithubAccessToken = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: "asia-northeast3", }, async (request) => { try { diff --git a/Firebase/functions/src/fcm/notification.ts b/Firebase/functions/src/fcm/notification.ts index 1f8d5a5e..b51d01ef 100644 --- a/Firebase/functions/src/fcm/notification.ts +++ b/Firebase/functions/src/fcm/notification.ts @@ -18,7 +18,7 @@ type FirestoreErrorLike = { // Cloud Tasks에 의해 트리거되는 함수 export const sendPushNotification = onTaskDispatched({ - maxInstances: 1, + maxInstances: 2, region: "asia-northeast3", retryConfig: { maxAttempts: 3, minBackoffSeconds: 5 }, rateLimits: { maxDispatchesPerSecond: 200 }, diff --git a/Firebase/functions/src/notification/deletion.ts b/Firebase/functions/src/notification/deletion.ts index 11b90379..95b1f66e 100644 --- a/Firebase/functions/src/notification/deletion.ts +++ b/Firebase/functions/src/notification/deletion.ts @@ -16,7 +16,7 @@ type NotificationDeletionTaskData = { export const requestPushNotificationDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -94,7 +94,7 @@ export const requestPushNotificationDeletion = onCall({ export const undoPushNotificationDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => { diff --git a/Firebase/functions/src/todo/deletion.ts b/Firebase/functions/src/todo/deletion.ts index a3f7af55..b62cf491 100644 --- a/Firebase/functions/src/todo/deletion.ts +++ b/Firebase/functions/src/todo/deletion.ts @@ -17,7 +17,7 @@ type TodoDeletionTaskData = { export const requestTodoDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -105,7 +105,7 @@ export const requestTodoDeletion = onCall({ export const undoTodoDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => { diff --git a/Firebase/functions/src/webPage/deletion.ts b/Firebase/functions/src/webPage/deletion.ts index c944e8c2..76470ecc 100644 --- a/Firebase/functions/src/webPage/deletion.ts +++ b/Firebase/functions/src/webPage/deletion.ts @@ -17,7 +17,7 @@ type WebPageDeletionTaskData = { export const requestWebPageDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => { @@ -101,7 +101,7 @@ export const requestWebPageDeletion = onCall({ export const undoWebPageDeletion = onCall({ cors: true, - maxInstances: 2, + maxInstances: 3, region: LOCATION, }, async (request) => {