diff --git a/api/src/pcapi/scripts/titelive_book_sync/main.py b/api/src/pcapi/scripts/titelive_book_sync/main.py new file mode 100755 index 00000000000..f942cc3aa12 --- /dev/null +++ b/api/src/pcapi/scripts/titelive_book_sync/main.py @@ -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)