Skip to content

Commit 8faf59e

Browse files
committed
Add fast_save
1 parent 09e855d commit 8faf59e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

airbyte_cdk/sources/streams/http/http_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def _request_session(self) -> requests.Session:
146146
else "file::memory:?cache=shared"
147147
)
148148
backend = requests_cache.SQLiteCache(
149-
sqlite_path, wal=True
150-
) # by using `PRAGMA journal_mode=WAL`, we avoid having `database table is locked` errors
149+
sqlite_path, fast_save=True, wal=True
150+
) # By using `PRAGMA synchronous=OFF` and `PRAGMA journal_mode=WAL`, we avoid having `database table is locked` errors. Note that those were blindly added at the same time and one or the other might be sufficient to prevent the issues but we have seen good results with both. Feel free to revisit given more information.
151151
return CachedLimiterSession(
152152
sqlite_path, backend=backend, api_budget=self._api_budget, match_headers=True
153153
)

0 commit comments

Comments
 (0)