Skip to content

Commit

Permalink
chore: use critical
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 committed Aug 22, 2024
1 parent a1c78a8 commit edba461
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)}")
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit edba461

Please sign in to comment.