عملية استبعاد للقناة لمهلة معيّنة
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتضمن كل خدمة سياسة انتهاء مهلة تلقائية وإعادة المحاولة المحددة في ملف client.rb
لهذه الخدمة. على سبيل المثال، يمكنك إلقاء نظرة على
خدمة الحملة
client.rb
وإيجاد طريقة self.configure
.
يمكن إلغاء هذه الإعدادات الافتراضية في خدمة بعد إنشاء مثيل لها. ولإجراء ذلك، اتبع المثال في
set_custom_client_timeouts.rb
.
يمكنك تعيين مهلة كبيرة كما تريد، ولكن قد ينتج عن الاستجابات التي تستغرق أكثر من ساعتين خطأ DEADLINE_EXCEEDED
.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eEach Google Ads API service has a default timeout and retry policy defined in its \u003ccode\u003eclient.rb\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eThese defaults can be overridden after service instantiation using the approach demonstrated in the \u003ccode\u003eset_custom_client_timeouts.rb\u003c/code\u003e example.\u003c/p\u003e\n"],["\u003cp\u003eWhile custom timeouts can be set to any duration, responses exceeding two hours might lead to a \u003ccode\u003eDEADLINE_EXCEEDED\u003c/code\u003e error.\u003c/p\u003e\n"]]],[],null,["# Timeouts\n\nEach service comes with a default timeout and retry policy specified in that\nservice's `client.rb` file. For an example, take a look at the campaign\nservice's\n[`client.rb`](https://github.com/googleads/google-ads-ruby/blob/main/lib/google/ads/google_ads/v21/services/campaign_service/client.rb)\nand find the `self.configure` method.\n\nThese defaults can be overridden on a service after you instantiate it. To do\nso, follow the example in\n[`set_custom_client_timeouts.rb`](https://github.com/googleads/google-ads-ruby/blob/main/examples/misc/set_custom_client_timeouts.rb).\n\nYou can set a timeout as large as you like, but responses that take over two\nhours might result in a\n[`DEADLINE_EXCEEDED`](/google-ads/api/reference/rpc/v21/InternalErrorEnum.InternalError) error."]]