-
Notifications
You must be signed in to change notification settings - Fork 212
Add TQ support #1002
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
Add TQ support #1002
Conversation
@@ -172,35 +220,6 @@ function checkAppCheckContext( | |||
expect(context.instanceIdToken).to.be.undefined; | |||
} | |||
|
|||
function checkAuthRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted these because a CallableRequest is a CallableContext. Made the overload explicit in the method I kept anyway.
@@ -648,6 +667,187 @@ describe('onCallHandler', () => { | |||
}); | |||
}); | |||
|
|||
describe('onEnqueueHandler', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy + paste + tweak from onCallHandler
@@ -201,6 +208,106 @@ describe('#onCall', () => { | |||
}); | |||
}); | |||
|
|||
describe('#onEnqueue', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy + paste + tweak from onCall
@@ -366,3 +366,139 @@ describe('onCall', () => { | |||
https.onCall((request: https.CallableRequest) => `Hello, ${request.data}`); | |||
}); | |||
}); | |||
|
|||
describe('onTaskEnqueue', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy + paste + tweak from onCall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, few suggested fixes.
src/common/providers/https.ts
Outdated
@@ -169,6 +169,56 @@ export interface CallableRequest<T = any> { | |||
rawRequest: Request; | |||
} | |||
|
|||
/** How a task should be retried in the event of a non-2xx return. */ | |||
export interface TaskRetryConfig { | |||
// If left unspecified, will default to 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Should be leave this comment out? Wondering if this comment is better left out since it's the responsibility of the CLI/Cloud Task Queue to set the defaults if missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the bug is that these aren't customer docs.
Adds preview support for TQ.
V1 APIs should have an
@hidden
annotation. V2 APIs area already hidden behind obscure imports.I'm having some trouble with code complete not prompting unless I start typing. If anyone knows what the issue might be there I'd love to know.