Skip to content

Commit 25975cc

Browse files
style(firestore-counter): format using prettier
1 parent 82c9a82 commit 25975cc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

firestore-counter/functions/src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,28 @@ export const controller = functions.handler.https.onRequest(
7676
* ControllerCore is monitoring these metadata documents to detect overload that requires
7777
* resharding and to detect failed workers that need poking.
7878
*/
79-
export const worker = functions.handler.firestore
80-
.document
81-
.onWrite(async (change, context) => {
79+
export const worker = functions.handler.firestore.document.onWrite(
80+
async (change, context) => {
8281
// stop worker if document got deleted
8382
if (!change.after.exists) return;
8483

8584
const worker = new ShardedCounterWorker(change.after, SHARDS_COLLECTION_ID);
8685
await worker.run();
87-
});
86+
}
87+
);
8888

8989
/**
9090
* This is an additional function that is triggered for every shard write. It is
9191
* limited to one concurrent run at the time. This helps reduce latency for workloads
9292
* that are below the threshold for workers.
9393
*/
94-
export const onWrite = functions.handler.firestore
95-
.document
96-
.onWrite(async (change, context) => {
94+
export const onWrite = functions.handler.firestore.document.onWrite(
95+
async (change, context) => {
9796
const metadocRef = firestore.doc(process.env.INTERNAL_STATE_PATH);
9897
const controller = new ShardedCounterController(
9998
metadocRef,
10099
SHARDS_COLLECTION_ID
101100
);
102101
await controller.aggregateContinuously({ start: "", end: "" }, 200, 60000);
103-
});
102+
}
103+
);

0 commit comments

Comments
 (0)