• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Tip - using Custom Timeouts with the SDK

Adobe Employee ,
Apr 27, 2022 Apr 27, 2022

Copy link to clipboard

Copied

Just a quick tip. Our docs explain how to use a custom timeout w/ the SDKs when calling services: https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/#custom-timeout-.... What we don't show is how to *use* that clientConfig object. It's really simple though - you pass it to your ExecutionContext creation call. Here's an example in Node, and it should be similar in your SDK of choice. 

 

const credentials = PDFServicesSdk.Credentials
		.serviceAccountCredentialsBuilder()
		.fromFile('pdftools-api-credentials.json')
		.build();

// set time outs to 2 minutes
const clientConfig = PDFServicesSdk.ClientConfig
		.clientConfigBuilder()
		.withConnectTimeout(1200000)
		.withReadTimeout(1200000)
		.build();

// Create an ExecutionContext using credentials
const executionContext = PDFServicesSdk.ExecutionContext.create(credentials, clientConfig);

 As an FYI, I've filed an issue internally to update our docs to mention this.

 

TOPICS
PDF Services API

Views

210

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources