diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-13 22:30:31 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-13 22:30:31 -0400 |
commit | e4d6f6a643ca07516ec3c8eb4a542c69cfb7b1a2 (patch) | |
tree | 56905a5aee8547e5df2a2f3d763e39a49068b83a /src/server/index.ts | |
parent | dcbbfe6d34e89df49069a0ede64df0dc5adc6056 (diff) |
updates
Diffstat (limited to 'src/server/index.ts')
-rw-r--r-- | src/server/index.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 79e9155d2..8767be17d 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -834,7 +834,12 @@ export interface NewMediaItem { } Array.prototype.batch = extensions.Batch; -Array.prototype.batchAction = extensions.BatchAction; +Array.prototype.executeInBatches = extensions.ExecuteInBatches; +Array.prototype.convertInBatches = extensions.ConvertInBatches; +Array.prototype.executeInBatchesAsync = extensions.ExecuteInBatchesAsync; +Array.prototype.convertInBatchesAsync = extensions.ConvertInBatchesAsync; +Array.prototype.executeInBatchesAtInterval = extensions.ExecuteInBatchesAtInterval; +Array.prototype.convertInBatchesAtInterval = extensions.ConvertInBatchesAtInterval; app.post(RouteStore.googlePhotosMediaUpload, async (req, res) => { const mediaInput: GooglePhotosUploadUtils.MediaInput[] = req.body.media; @@ -858,7 +863,7 @@ app.post(RouteStore.googlePhotosMediaUpload, async (req, res) => { return newMediaItems; }; - const newMediaItems = await mediaInput.batchAction<NewMediaItem>(25, dispatchUpload, 3000); + const newMediaItems = await mediaInput.convertInBatchesAtInterval<NewMediaItem>(25, dispatchUpload, 3); if (failed) { return _error(res, tokenError); |