Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move some TQ triggers under new namespace. #1069

Merged
merged 21 commits into from
Apr 4, 2022
Merged

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Mar 30, 2022

Move all task queue related API under newly formed tasks package. Task queue function are now under tasks namespace:

export const factorize = functions.tasks.taskQueue({
  rateLimits: {
    maxBurstSize: 2,
    maxConcurrentDispatches: 1,
    maxDispatchesPerSecond: 1,
  },
  retryConfig: {
    maxAttempts: 100,
    maxRetrySeconds: 1000,
    maxBackoffSeconds: 20,
    maxDoublings: 10,
    minBackoffSeconds: 0.1,
  }
}).onDispatch((data, context) => {
  deducePrivateKey(data.publicKey);
});

Same goes for handler namespace.

Few other changes:

  1. Add probably-forgotten maxRetrySeconds option for task queues.
  2. Remove maxBurstsize option since it's outputonly.

@taeold taeold changed the title Move some TQ triggers under new namespace Move some TQ triggers under new namespace. Mar 30, 2022
@taeold taeold merged commit c31cf60 into master Apr 4, 2022
@taeold taeold deleted the dl-tasks-namespace branch April 4, 2022 18:27
Copy link
Member

@inlined inlined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admittedly I scanned this one since much of it should be cut & paste.

@@ -0,0 +1,127 @@
// The MIT License (MIT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: helper is a dirty word. Can we at least call it a fooHelper? Maybe httpsBasedHelper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants