Skip to content

Commit c31cf60

Browse files
authored
Move some TQ triggers under new namespace. (#1069)
Move all task queue related API under newly formed `tasks` package. Task queue function are now under `tasks` namespace: ``` export const factorize = functions.tasks.taskQueue({ rateLimits: { maxBurstSize: 2, maxConcurrentDispatches: 1, maxDispatchesPerSecond: 1, }, retryConfig: { maxAttempts: 100, maxRetrySeconds: 1000, maxBackoffSeconds: 20, maxDoublings: 10, minBackoffSeconds: 0.1, } }).onDispatch((data, context) => { deducePrivateKey(data.publicKey); }); ``` Same goes for handler namespace. Few other changes: 1) Add probably-forgotten `maxRetrySeconds` option for task queues. 2) Remove `maxBurstsize` option since it's outputonly.
1 parent b9de399 commit c31cf60

28 files changed

+1353
-1101
lines changed

package.json

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"./lib/providers/pubsub": "./lib/providers/pubsub.js",
4141
"./lib/providers/remoteConfig": "./lib/providers/remoteConfig.js",
4242
"./lib/providers/storage": "./lib/providers/storage.js",
43+
"./lib/providers/tasks": "./lib/providers/tasks.js",
4344
"./lib/providers/testLab": "./lib/providers/testLab.js",
4445
"./v1": "./lib/index.js",
4546
"./v1/analytics": "./lib/providers/analytics.js",
@@ -58,6 +59,7 @@
5859
"./v2/params": "./lib/v2/params/index.js",
5960
"./v2/pubsub": "./lib/v2/providers/pubsub.js",
6061
"./v2/storage": "./lib/v2/providers/storage.js",
62+
"./v2/tasks": "./lib/v2/providers/tasks.js",
6163
"./v2/alerts": "./lib/v2/providers/alerts/index.js",
6264
"./v2/alerts/appDistribution": "./lib/v2/providers/alerts/appDistribution.js",
6365
"./v2/alerts/billing": "./lib/v2/providers/alerts/billing.js",
@@ -98,12 +100,27 @@
98100
"v1/storage": [
99101
"lib/providers/storage"
100102
],
103+
"v1/tasks": [
104+
"lib/providers/tasks"
105+
],
101106
"v1/testLab": [
102107
"lib/providers/testLab"
103108
],
104109
"v2": [
105110
"lib/v2"
106111
],
112+
"v2/alerts": [
113+
"lib/v2/providers/alerts"
114+
],
115+
"v2/alerts/appDistribution": [
116+
"lib/v2/providers/alerts/appDistribution"
117+
],
118+
"v2/alerts/billing": [
119+
"lib/v2/providers/alerts/billing"
120+
],
121+
"v2/alerts/crashlytics": [
122+
"lib/v2/providers/alerts/crashlytics"
123+
],
107124
"v2/base": [
108125
"lib/v2/base"
109126
],
@@ -122,17 +139,8 @@
122139
"v2/storage": [
123140
"lib/v2/providers/storage"
124141
],
125-
"v2/alerts": [
126-
"lib/v2/providers/alerts"
127-
],
128-
"v2/alerts/appDistribution": [
129-
"lib/v2/providers/alerts/appDistribution"
130-
],
131-
"v2/alerts/billing": [
132-
"lib/v2/providers/alerts/billing"
133-
],
134-
"v2/alerts/crashlytics": [
135-
"lib/v2/providers/alerts/crashlytics"
142+
"v2/tasks": [
143+
"lib/v2/providers/tasks"
136144
]
137145
}
138146
},

0 commit comments

Comments
 (0)