Skip to content

Commit

Permalink
Chore.etl 77 handle requests connection reset (#161)
Browse files Browse the repository at this point in the history
* chore: retry reset connection error

* chore: revert use batch value

* chore:  use batch value

* chore: use batch value set to false
  • Loading branch information
am6010 authored Sep 22, 2023
1 parent ef638e7 commit 5e099a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import backoff
import pendulum
import requests
from airbyte_cdk.models import FailureType
from airbyte_cdk.utils import AirbyteTracedException
from cached_property import cached_property
Expand Down Expand Up @@ -168,7 +169,7 @@ def call(
except FacebookRequestError as exc:
MyFacebookAdsApi.reset_session()
raise exc
except ConnectionResetError as exc:
except requests.exceptions.ConnectionError as exc:
MyFacebookAdsApi.reset_session()
body = {
"error": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class AdCreatives(FBMarketingStream):

entity_prefix = "adcreative"
enable_deleted = False
use_batch = False

def __init__(self, fetch_thumbnail_images: bool = False, **kwargs):
super().__init__(**kwargs)
Expand Down

0 comments on commit 5e099a8

Please sign in to comment.