-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.
Description
The new api has made my code simpler so thanks. However I find that now there is no ACK which returns a promise then in a Cloud Function I have to write code like this i.e. the call to 'subscription.close()' does not flush the pending ACKs before resolving:
return new Promise(
function (resolve, reject) {
messages.map(message => { message.ack() })
subscription.close()
.then(() => {
setTimeout(function () {
resolve()
}, 3000)
})
.catch(err => reject(err))
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.