Skip to content

Commit

Permalink
fix(worker): edit function max time to 2mins [#33]
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored Mar 16, 2022
1 parent 6be0384 commit c2a47a7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,13 @@ exports.updateTokens = functions.pubsub.schedule(cron).onRun(() => {
})
console.log(`-- Sheduled update E-Com Plus tokens '${cron}'`)

exports.worker = functions.pubsub.schedule('* * * * *').onRun(() => {
return prepareAppSdk().then(appSdk => {
return handleWorker()
exports.worker = functions
.runWith({
timeoutSeconds: 118,
memory: '128MB',
})
.pubsub.schedule('*/2 * * * *').onRun(() => {
return prepareAppSdk().then(appSdk => {
return handleWorker()
})
})
})

0 comments on commit c2a47a7

Please sign in to comment.