Skip to content

Commit

Permalink
(BSR)[API] script: sync titelive book with higher statement_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dnguyen1-pass committed Jan 7, 2025
1 parent 12a6572 commit 522ebd2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/src/pcapi/scripts/titelive_book_sync/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import datetime

import sqlalchemy as sa

from pcapi.core.providers.titelive_book_search import TiteliveBookSearch
from pcapi.models import db


if __name__ == "__main__":
from pcapi.flask_app import app

app.app_context().push()

db.session.execute(sa.text("set session statement_timeout = '400s'"))
TiteliveBookSearch().synchronize_products(datetime.date(2025, 1, 6), datetime.date(2025, 1, 7), 129)

0 comments on commit 522ebd2

Please sign in to comment.