Skip to content

Commit 844d239

Browse files
(BSR) feat: create separate FF for new titelive products synchronization base on type (book, paper)
1 parent ff71c26 commit 844d239

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

api/src/pcapi/alembic/versions/sql/schema_init.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8273,7 +8273,7 @@ INSERT INTO public.feature VALUES (144, 'WIP_ASYNCHRONOUS_CELERY_CREATE_UPDATE_E
82738273
INSERT INTO public.feature VALUES (145, 'WIP_FREE_ELIGIBILITY', 'Activer la nouvelle éligibilité qui permet aux jeunes de 15 à 16 ans de réserver des offres gratuites', true);
82748274
INSERT INTO public.feature VALUES (146, 'ENABLE_CODIR_OFFERERS_REPORT', 'Active le rapport sur les entités juridiques actives pour le CODIR (tourne la nuit)', false);
82758275
INSERT INTO public.feature VALUES (147, 'DISABLE_SIRET_CHECK', 'Désactiver la validation de SIRET', true);
8276-
INSERT INTO public.feature VALUES (148, 'SYNCHRONIZE_TITELIVE_PRODUCTS_FROM_BIGQUERY_TABLES', 'Permettre la synchronisation des produits Titelive via les tables BigQuery fournies par l''équipe data', false);
8276+
INSERT INTO public.feature VALUES (148, 'SYNCHRONIZE_TITELIVE_BOOK_PRODUCTS_FROM_BIGQUERY_TABLES', 'Permet la synchronisation des produits livre Titelive via les tables BigQuery fournies par l''équipe Data', false);
82778277
INSERT INTO public.feature VALUES (149, 'ENABLE_DS_APPLICATION_REFUSED_FROM_ANNOTATION', 'Active le refus automatique des dossiers DS (DMS) de crédit en fonction de l''annotation d''un instructeur', false);
82788278
INSERT INTO public.feature VALUES (150, 'DISCORD_ENABLE_NEW_ACCESS', 'Activer/Désactiver l''accès au serveur Discord à des nouveaux utilisateurs', true);
82798279
INSERT INTO public.feature VALUES (151, 'ENABLE_INVOICE_SYNC', 'Active la synchronisation des justificatifs de remboursement avec l''outil finance externe (Cegid XRP Flex)', true);

api/src/pcapi/core/products/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
show_default=True,
2323
)
2424
@cron_decorators.log_cron_with_transaction
25-
@cron_decorators.cron_require_feature(FeatureToggle.SYNCHRONIZE_TITELIVE_PRODUCTS_FROM_BIGQUERY_TABLES)
25+
@cron_decorators.cron_require_feature(FeatureToggle.SYNCHRONIZE_TITELIVE_BOOK_PRODUCTS_FROM_BIGQUERY_TABLES)
2626
def synchronize_titelive_book_products_from_bigquery(batch_size: int) -> None:
2727
BigQueryTiteliveBookProductSync().synchronize_products(batch_size)
2828

@@ -36,6 +36,6 @@ def synchronize_titelive_book_products_from_bigquery(batch_size: int) -> None:
3636
show_default=True,
3737
)
3838
@cron_decorators.log_cron_with_transaction
39-
@cron_decorators.cron_require_feature(FeatureToggle.SYNCHRONIZE_TITELIVE_PRODUCTS_FROM_BIGQUERY_TABLES)
39+
@cron_decorators.cron_require_feature(FeatureToggle.SYNCHRONIZE_TITELIVE_MUSIC_PRODUCTS_FROM_BIGQUERY_TABLES)
4040
def synchronize_titelive_music_products_from_bigquery(batch_size: int) -> None:
4141
BigQueryTiteliveMusicProductSync().synchronize_products(batch_size)

api/src/pcapi/models/feature.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ class FeatureToggle(enum.Enum):
100100
)
101101
SYNCHRONIZE_ALLOCINE = "Permettre la synchronisation journalière avec Allociné"
102102
SYNCHRONIZE_TITELIVE_PRODUCTS = "Permettre limport journalier du référentiel des livres"
103-
SYNCHRONIZE_TITELIVE_PRODUCTS_FROM_BIGQUERY_TABLES = (
104-
"Permettre la synchronisation des produits Titelive via les tables BigQuery fournies par l'équipe data"
103+
SYNCHRONIZE_TITELIVE_BOOK_PRODUCTS_FROM_BIGQUERY_TABLES = (
104+
"Permet la synchronisation des produits livre Titelive via les tables BigQuery fournies par l'équipe Data"
105+
)
106+
SYNCHRONIZE_TITELIVE_MUSIC_PRODUCTS_FROM_BIGQUERY_TABLES = (
107+
"Permet la synchronisation des produits musique de Titelive via les tables BigQuery fournies par l'équipe Data"
105108
)
106109
SYNCHRONIZE_TITELIVE_API_MUSIC_PRODUCTS = (
107110
"Permettre l'import journalier du référentiel de la musique à travers l'API Titelive"
@@ -209,7 +212,8 @@ def nameKey(self) -> str:
209212
FeatureToggle.VENUE_REGULARIZATION,
210213
FeatureToggle.SEND_ALL_EMAILS_TO_EHP,
211214
FeatureToggle.SYNCHRONIZE_TITELIVE_API_MUSIC_PRODUCTS,
212-
FeatureToggle.SYNCHRONIZE_TITELIVE_PRODUCTS_FROM_BIGQUERY_TABLES,
215+
FeatureToggle.SYNCHRONIZE_TITELIVE_BOOK_PRODUCTS_FROM_BIGQUERY_TABLES,
216+
FeatureToggle.SYNCHRONIZE_TITELIVE_MUSIC_PRODUCTS_FROM_BIGQUERY_TABLES,
213217
FeatureToggle.WIP_ASYNCHRONOUS_CELERY_MAILS,
214218
FeatureToggle.WIP_ASYNCHRONOUS_CELERY_BATCH_UPDATE_STATUSES,
215219
FeatureToggle.WIP_DISABLE_CANCEL_BOOKING_NOTIFICATION,

0 commit comments

Comments
 (0)