Add a bit of time to the Android proxy creation retry (#35174)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34776 

Adds delay to subsequent retries on creation of Android enterprise

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
This commit is contained in:
Jordan Montgomery
2025-11-05 09:13:13 -05:00
committed by GitHub
co-authored by Eric
parent 8b03dcb73d
commit 4bedbca6c2
@@ -93,12 +93,12 @@ module.exports = {
// [?]: https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/getIamPolicy
// Retrieve the IAM policy for the created pubsub topic.
let newPubSubTopicIamPolicy = await sails.helpers.flow.build(async ()=>{
let newPubSubTopicIamPolicy = await sails.helpers.flow.build(async () => {
let getIamPolicyResponse = await pubsub.projects.topics.getIamPolicy({
resource: fullPubSubTopicName,
});
return getIamPolicyResponse.data;
}).retry();
}).retry(undefined, [1000, 1500, 2000]);
// Grand Android device policy the right to publish
// See: https://developers.google.com/android/management/notifications
@@ -112,14 +112,14 @@ module.exports = {
// Update the pubsub topic's IAM policy
// [?]: https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/setIamPolicy
await sails.helpers.flow.build(async ()=>{
await sails.helpers.flow.build(async () => {
await pubsub.projects.topics.setIamPolicy({
resource: fullPubSubTopicName,
requestBody: {
policy: newPubSubTopicIamPolicy
}
});
}).retry();
}).retry(undefined, [1000, 1500, 2000]);
// Create a new subscription for the created pubsub topic.
// [?]: https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create