File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function getAppleConfiguration() {
5454
5555export const requestAppleCustomToken = onCall ( {
5656 cors : true ,
57- maxInstances : 3 ,
57+ maxInstances : 2 ,
5858 region : "asia-northeast3" ,
5959} , async ( request ) => {
6060 try {
@@ -142,7 +142,7 @@ export const requestAppleCustomToken = onCall({
142142
143143export const requestAppleRefreshToken = onCall ( {
144144 cors : true ,
145- maxInstances : 3 ,
145+ maxInstances : 2 ,
146146 region : "asia-northeast3" ,
147147 } , async ( request ) => {
148148 if ( ! request . auth ) {
@@ -186,7 +186,7 @@ export const requestAppleRefreshToken = onCall({
186186
187187export const refreshAppleAccessToken = onCall ( {
188188 cors : true ,
189- maxInstances : 3 ,
189+ maxInstances : 2 ,
190190 region : "asia-northeast3" ,
191191} , async ( request ) => {
192192 // 인증 확인
@@ -267,7 +267,7 @@ export const refreshAppleAccessToken = onCall({
267267
268268export const revokeAppleAccessToken = onCall ( {
269269 cors : true ,
270- maxInstances : 3 ,
270+ maxInstances : 2 ,
271271 region : "asia-northeast3" ,
272272} , async ( request ) => {
273273 // 인증 확인
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import axios from "axios";
55// GitHub OAuth 인증 및 커스텀 토큰 발급 함수
66export const requestGithubTokens = onCall ( {
77 cors : true ,
8- maxInstances : 3 ,
8+ maxInstances : 2 ,
99 region : "asia-northeast3" ,
1010} , async ( request ) => {
1111 try {
@@ -103,7 +103,7 @@ export const requestGithubTokens = onCall({
103103
104104export const revokeGithubAccessToken = onCall ( {
105105 cors : true ,
106- maxInstances : 3 ,
106+ maxInstances : 2 ,
107107 region : "asia-northeast3" ,
108108 } , async ( request ) => {
109109 try {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ type FirestoreErrorLike = {
1818
1919// Cloud Tasks에 의해 트리거되는 함수
2020export const sendPushNotification = onTaskDispatched ( {
21- maxInstances : 2 ,
21+ maxInstances : 1 ,
2222 region : "asia-northeast3" ,
2323 retryConfig : { maxAttempts : 3 , minBackoffSeconds : 5 } ,
2424 rateLimits : { maxDispatchesPerSecond : 200 } ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type ErrorLike = {
2525} ;
2626
2727export const scheduleTodoReminder = onSchedule ( {
28- maxInstances : 2 ,
28+ maxInstances : 1 ,
2929 region : LOCATION ,
3030 schedule : "*/5 * * * *" ,
3131 timeZone : "UTC"
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type NotificationDeletionTaskData = {
1616
1717export const requestPushNotificationDeletion = onCall ( {
1818 cors : true ,
19- maxInstances : 3 ,
19+ maxInstances : 2 ,
2020 region : LOCATION ,
2121 } ,
2222 async ( request ) => {
@@ -94,7 +94,7 @@ export const requestPushNotificationDeletion = onCall({
9494
9595export const undoPushNotificationDeletion = onCall ( {
9696 cors : true ,
97- maxInstances : 3 ,
97+ maxInstances : 2 ,
9898 region : LOCATION ,
9999 } ,
100100 async ( request ) => {
@@ -147,7 +147,7 @@ export const undoPushNotificationDeletion = onCall({
147147) ;
148148
149149export const completePushNotificationDeletion = onTaskDispatched ( {
150- maxInstances : 2 ,
150+ maxInstances : 1 ,
151151 region : LOCATION ,
152152 retryConfig : { maxAttempts : 3 , minBackoffSeconds : 5 } ,
153153 rateLimits : { maxDispatchesPerSecond : 200 } ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const DELETE_BATCH_SIZE = 200;
88const QUERY_BATCH_SIZE = 100 ;
99
1010export const removeTodoNotificationDocuments = onDocumentDeleted ( {
11- maxInstances : 2 ,
11+ maxInstances : 1 ,
1212 document : "users/{userId}/todoLists/{todoId}" ,
1313 region : LOCATION
1414 } ,
@@ -30,7 +30,7 @@ export const removeTodoNotificationDocuments = onDocumentDeleted({
3030) ;
3131
3232export const removeCompletedTodoNotificationRecords = onDocumentUpdated ( {
33- maxInstances : 2 ,
33+ maxInstances : 1 ,
3434 document : "users/{userId}/todoLists/{todoId}" ,
3535 region : LOCATION
3636 } ,
@@ -66,7 +66,7 @@ export const removeCompletedTodoNotificationRecords = onDocumentUpdated({
6666) ;
6767
6868export const cleanupUnusedTodoNotificationRecords = onSchedule ( {
69- maxInstances : 2 ,
69+ maxInstances : 1 ,
7070 region : LOCATION ,
7171 schedule : "0 * * * *" ,
7272 timeZone : "UTC"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type TodoDeletionTaskData = {
1717
1818export const requestTodoDeletion = onCall ( {
1919 cors : true ,
20- maxInstances : 3 ,
20+ maxInstances : 2 ,
2121 region : LOCATION ,
2222 } ,
2323 async ( request ) => {
@@ -105,7 +105,7 @@ export const requestTodoDeletion = onCall({
105105
106106export const undoTodoDeletion = onCall ( {
107107 cors : true ,
108- maxInstances : 3 ,
108+ maxInstances : 2 ,
109109 region : LOCATION ,
110110 } ,
111111 async ( request ) => {
@@ -163,7 +163,7 @@ export const undoTodoDeletion = onCall({
163163) ;
164164
165165export const completeTodoDeletion = onTaskDispatched ( {
166- maxInstances : 2 ,
166+ maxInstances : 1 ,
167167 region : LOCATION ,
168168 retryConfig : { maxAttempts : 3 , minBackoffSeconds : 5 } ,
169169 rateLimits : { maxDispatchesPerSecond : 200 } ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const LOCATION = "asia-northeast3";
77const BATCH_SIZE = 200 ;
88
99export const syncTodoNotificationCategory = onDocumentUpdated ( {
10- maxInstances : 2 ,
10+ maxInstances : 1 ,
1111 document : "users/{userId}/todoLists/{todoId}" ,
1212 region : LOCATION
1313 } ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ type TodoCategoryUpdateTaskData = {
2121} ;
2222
2323export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated ( {
24- maxInstances : 2 ,
24+ maxInstances : 1 ,
2525 document : "users/{userId}/userData/categories" ,
2626 region : LOCATION
2727 } ,
@@ -81,7 +81,7 @@ export const requestMoveRemovedCategoryTodosToEtc = onDocumentUpdated({
8181) ;
8282
8383export const completeMoveRemovedCategoryTodosToEtc = onTaskDispatched ( {
84- maxInstances : 2 ,
84+ maxInstances : 1 ,
8585 region : LOCATION ,
8686 retryConfig : { maxAttempts : 3 , minBackoffSeconds : 5 } ,
8787 rateLimits : { maxDispatchesPerSecond : 20 } ,
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import * as admin from "firebase-admin";
33import * as logger from "firebase-functions/logger" ;
44
55export const cleanupDeletedUserFirestoreData = functions
6+ . runWith ( {
7+ maxInstances : 1
8+ } )
69 . region ( "asia-northeast3" )
710 . auth
811 . user ( )
You can’t perform that action at this time.
0 commit comments