diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py index d00f215ab5f9..0ec177ef180e 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_insight_streams.py @@ -138,7 +138,7 @@ def read_records( expires_at = self._api.api.get_access_token_expiration() if expires_at and pendulum.from_timestamp(expires_at) - pendulum.now() < pendulum.duration(days=57): - self.logger.error(f"Access token expires at {pendulum.from_timestamp(expires_at)}. Please reconnect the source.") + self.logger.critical(f"Access token expires at {pendulum.from_timestamp(expires_at)}. Please reconnect the source.") @property def state(self) -> MutableMapping[str, Any]: diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_streams.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_streams.py index 2d0f8ead9f98..ba3a4ffcb209 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_streams.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/base_streams.py @@ -123,7 +123,7 @@ def read_records( expires_at = self._api.api.get_access_token_expiration() if expires_at and pendulum.from_timestamp(expires_at) - pendulum.now() < pendulum.duration(days=7): - self.logger.error(f"Access token expires at {pendulum.from_timestamp(expires_at)}") + self.logger.critical(f"Access token expires at {pendulum.from_timestamp(expires_at)}") @abstractmethod def list_objects(self, params: Mapping[str, Any]) -> Iterable: @@ -288,4 +288,4 @@ def read_records( expires_at = self._api.api.get_access_token_expiration() if expires_at and pendulum.from_timestamp(expires_at) - pendulum.now() < pendulum.duration(days=7): - self.logger.error(f"Access token expires at {pendulum.from_timestamp(expires_at)}") + self.logger.critical(f"Access token expires at {pendulum.from_timestamp(expires_at)}") diff --git a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py index f24fd17f2bd1..1428fc374f20 100644 --- a/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py +++ b/airbyte-integrations/connectors/source-facebook-marketing/source_facebook_marketing/streams/streams.py @@ -73,7 +73,7 @@ def read_records( expires_at = self._api.api.get_access_token_expiration() if expires_at and pendulum.from_timestamp(expires_at) - pendulum.now() < pendulum.duration(days=7): - self.logger.error(f"Access token expires at {pendulum.from_timestamp(expires_at)}") + self.logger.critical(f"Access token expires at {pendulum.from_timestamp(expires_at)}") def list_objects(self, params: Mapping[str, Any]) -> Iterable: return self._api.account.get_ad_creatives(params=params)