Merge pull request #19 from devsapp/fix#fc-460
fix: invoke function carry X-Fc-Invocation-Code-Version:Latest
This commit is contained in:
commit
0bc9d61b5f
|
@ -82,6 +82,7 @@ export default class RemoteInvoke {
|
|||
if (invocationType === 'Sync') {
|
||||
const rs = await this.fcClient.invokeFunction(serviceName, functionName, event, {
|
||||
'X-Fc-Log-Type': 'Tail',
|
||||
'X-Fc-Invocation-Code-Version': 'Latest',
|
||||
'X-Fc-Invocation-Type': invocationType,
|
||||
}, qualifier);
|
||||
|
||||
|
@ -92,6 +93,7 @@ export default class RemoteInvoke {
|
|||
} else {
|
||||
logger.debug(`Stateful async invocation id: ${statefulAsyncInvocationId}`);
|
||||
const { headers } = await this.fcClient.invokeFunction(serviceName, functionName, event, {
|
||||
'X-Fc-Invocation-Code-Version': 'Latest',
|
||||
'X-Fc-Invocation-Type': invocationType,
|
||||
'X-Fc-Stateful-Async-Invocation-Id': statefulAsyncInvocationId,
|
||||
}, qualifier);
|
||||
|
@ -118,6 +120,9 @@ export default class RemoteInvoke {
|
|||
if (!headers['X-Fc-Log-Type']) {
|
||||
headers['X-Fc-Log-Type'] = 'Tail';
|
||||
}
|
||||
if (!headers['X-Fc-Invocation-Code-Version']) {
|
||||
headers['X-Fc-Invocation-Code-Version'] = 'Latest';
|
||||
}
|
||||
|
||||
let resp;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue