Commit graph

319 commits

Author SHA1 Message Date
simon lehericey
ee471614eb tech(pjs): add pjs migration cron 2023-07-12 12:05:25 +02:00
Colin Darie
5db80ee6de
feat(sva): cron accepts dossiers for each sva procedure 2023-07-11 10:01:47 +02:00
Colin Darie
3885864200
Merge pull request #9289 from demarches-simplifiees/new_pj_scheme
Change le nommage des pjs à %Y/%m/%d/sd/sd.....
2023-07-10 13:20:34 +00:00
Paul Chavard
c74351459e feat(champ): add result error handling to ChampFetchExternalDataJob 2023-07-10 14:57:34 +02:00
simon lehericey
db70624398 feat(pj): change naming scheme to %Y/%m/%d/sd/sd..... 2023-07-10 11:44:33 +02:00
Paul Chavard
7136c96a36 feat(procedure): validate external links 2023-07-06 10:27:43 +02:00
Martin
6f2bd8f27c correctif(expiration): re-active l'expiration des dossiers termines 2023-06-29 09:22:48 +02:00
Martin
cc4d124068 tech(expires): pause car on est entrain de trop enqueue de jobs 2023-06-27 16:30:52 +02:00
simon lehericey
7ec604ced3 typo 2023-06-26 21:32:07 +02:00
Martin
a0ceee96bd amelioration(email.resume_hebdomadaire): envoie le mail a 4h du matin sur une periode de 3h
tech(
Co-authored-by: Colin Darie <colin@darie.eu>
2023-06-26 17:47:53 +02:00
Martin
d45a250075 amelioration(mail): ajoute d'un simili rate limiter pour envoyer les mails sur des fenetres de temps ayant une limite 2023-06-26 17:28:27 +02:00
Martin
61d620c280 amelioration(expiration.dossiers): evite d'envoyer tous les mails d'un coup. Donc supprime les dossiers en brouillon a 22h, les dossiers en construction a 14h, les dossiers termine a 7h. 2023-06-26 15:51:26 +02:00
simon lehericey
9fa864448e add tasks / job to migrate pjs under namespace 2023-06-26 13:50:18 +02:00
Colin Darie
7023284726
Merge pull request #9195 from colinux/job-declarative-dossier-unit
Jobs: traite en isolation les dossiers bloqués de démarches déclaratives
2023-06-19 14:44:59 +00:00
Paul Chavard
c2ae3426cd fix(commune): a commune can not be located in 99 2023-06-16 08:38:01 +01:00
Colin Darie
3939f85860
refactor(job): wrap sentry tags in a single before_perform 2023-06-14 12:06:22 +02:00
Colin Darie
17f5fb4a51
refactor(declarative): process dossier in job isolation 2023-06-14 12:06:22 +02:00
Paul Chavard
c4432b1b47 perf(carto): use json schema to validate geojson instead of rgeo 2023-06-06 15:43:56 +02:00
krichtof
0051face93
Merge pull request #9014 from demarches-simplifiees/8859-default_zones
Etq admin, lors de la création ou modification d'une démarche, des zones par défaut me sont suggérées
2023-05-26 17:25:21 +00:00
Christophe Robillard
76a8b721ce add tva adapter and tva job 2023-05-26 13:37:20 +02:00
Christophe Robillard
f04e121a6f add extrait_kbis to handle nom_commercial and capital_social 2023-05-26 13:37:20 +02:00
Christophe Robillard
ca922005f9 add admin update default zones job 2023-05-16 09:40:53 +02:00
Colin Darie
79f450a422
Merge pull request #9021 from colinux/feat-en-construction-fork
ETQ usager, je modifie et soumets à nouveau mon dossier “en construction"
2023-05-10 19:46:40 +00:00
Colin Darie
f6ebfe0e47
fix(dossier): sync search_terms after merge
Use a job instead of a lot of reloads
2023-05-09 18:49:52 +02:00
Paul Chavard
025bd5beaf
feat(dossier): dossier can be forked for editing 2023-05-09 15:34:10 +02:00
Colin Darie
f7029615a9
refactor(email): spread sending of instructeur digest emails over time
On envoi parfois plus de 20K mails, ce qui pose des problèmes de délivrance
et quotas si on le fait d'un coup.
On étale donc un peu dans la durée ces envois pour pas limiter le dépassement
de quota.
2023-05-09 11:32:43 +02:00
Colin Darie
e8e785b953
refactor(rubocop): fix Rails/ToFormattedS 2023-05-03 11:35:30 +02:00
Paul Chavard
1d10e59e63 fix(commune): fix ‘undefined’ departement codes 2023-04-27 12:07:43 +02:00
Martin
9dec6f1611 correctif(procedure.declarative): ETQ administrateur d'une procedure declarative, certains de mes dossiers restent en construction [ex: l'object storage est down, le dossier reste bloqué] 2023-04-21 15:45:45 +02:00
Colin Darie
160178b8f8
chore(rubocop): fix Rails/ExpandedDateRange 2023-04-19 12:55:13 +02:00
Paul Chavard
def32a3615 chore(dossier): remove fallback from commune champ 2023-04-11 10:49:01 +02:00
Paul Chavard
a6e3ea4839 fix(dossier): normalize champs commune data 2023-04-07 16:02:13 +02:00
Colin Darie
4288f28ac8 chore(job): same max_run_time between ArchiveCreationJob and ExportJob 2023-03-09 15:37:13 +01:00
Colin Darie
697aeeb348 refactor(job): DossieRebaseJob in new queue so they don't interfere with others
Ces jobs sont empilés par milliers d'un coup et peuvent mettre des dizaines
de minutes à s'écouler. On ne veut pas que ça interfère avec d'autres jobs,
notamment les scans antivirus qui, si retardés, empilent des "poll" pour
connaitre le status du fichier.
2023-03-09 15:18:14 +01:00
Colin Darie
86f15b8c05 chore(job): config delayed job for long-living export jobs 2023-03-08 18:37:41 +01:00
Colin Darie
6b87c290cb fix(cron): PurgeOldEmailEvent in batches 2023-03-08 15:31:10 +01:00
Colin Darie
d20114f978 chore(sentry): use "procedure" tag everywhere for a better debug experience 2023-03-08 13:48:44 +01:00
Colin Darie
43613009d6
fix(job): Cron::WeeklyOverviewJob simplified and respect dolist API rate limiting 2023-03-06 14:39:55 +01:00
Colin Darie
f8f14830a6
fix(missing-antivirus-job): retry when backend is unavailable 2023-03-06 14:39:55 +01:00
Colin Darie
e9585632d9 fix(job): hopefully fix pg timeouts in Cron::PurgeUnattachedBlobsJob 2023-03-02 13:42:04 +01:00
sebastiencarceles
f52554b5a3 review: update value with async fetch
1 - spec cover the job which fetches external data

2 - refactor the job with guard clauses

3 - delegate update operation to the champ itself

4 - annuaire education: override the update operation
to let the value be populated by the fetched data

5 - prefilling: don't fetch data synchronously
2023-02-28 14:53:08 +01:00
Paul Chavard
f6b528e497 chore(geo_area): normalize all geo_areas 2023-02-15 11:58:59 +01:00
sebastiencarceles
f0ffae8320 migrate(champs): normalize departements 2023-02-13 16:32:34 +01:00
Colin Darie
a4329b6699 chore(export/job): set procedure_id for sentry 2023-02-09 11:06:54 +01:00
Colin Darie
964f3829c6 fix(export/job): race condition when export was already generated 2023-02-09 11:06:54 +01:00
Martin
f4cc8078b4 amelioration(EmailEvent): purge les email_events vieux de plus de un mois
Update app/models/email_event.rb

Co-authored-by: Colin Darie <colin@darie.eu>

Update app/jobs/cron/purge_old_email_event_job.rb

Co-authored-by: Colin Darie <colin@darie.eu>
2023-02-06 10:35:57 +01:00
Lisa Durand
120fbb0ef7 Overload the finished_at 2023-02-01 17:06:04 +01:00
Lisa Durand
d0a131dc55 change the way we set the finished_at on batch operation job to fix alert display bug 2023-02-01 17:06:04 +01:00
Paul Chavard
dd2d3d4626 fix(task): improuve after party backfill_dossiers_repetitions 2023-02-01 15:27:07 +01:00
Paul Chavard
8bf0d9c5ec fix(dossier): backfill missing repetition champs 2023-02-01 10:36:46 +01:00
Damien Le Thiec
3a8a50a216
Allow prefill pays type de champs (#8344)
* Allow prefill pays type de champs

* Avoid conditional prefil params for pays champ

* Clean pays data with batch update

* Fix bug and add test batch update pays value

* Improve performance batch_update_pays

* Fix associated country code problem

* Fix after party task name

* Format country name if needed in batch update
2023-01-18 12:52:38 +01:00
Colin Darie
784b0458fe feat(dolist): consolidate dispatched events with delivered emails 2023-01-18 09:56:40 +01:00
Damien Le Thiec
5e26acb0e1
Make date and datetime prefillable (#8304)
* Make date and datetime prefillable

* Format in ISO8601 format
2023-01-12 17:42:02 +01:00
Damien Le Thiec
d5bfe84381
Nettoyage des dossiers préremplis abandonnés (#8341)
* Clean prefilled dossiers
2023-01-12 16:14:42 +01:00
Paul Chavard
dfe65136be refactor(repetition): add row_id to champs 2023-01-05 18:04:54 +01:00
Martin
018a94f43b correctif(batch_operation): empeche de changer l'etat d'un dossier en cas d'erreur. et s'assure de delinker le dossier en cas de dossier invalid 2023-01-05 16:20:18 +01:00
Paul Chavard
6e18090fb3 refactor(virus_scan_result): use column instead of metadata on blob 2023-01-04 12:12:11 +01:00
Paul Chavard
d469bca0ae refactor(watermark): use column instead of metadata on blob 2023-01-04 12:07:08 +01:00
Christophe Robillard
edffd0a7a8 extract ds_opendata_enabled 2022-12-20 12:52:56 +01:00
Christophe Robillard
daa4411abe Revert "unschedule export demarches opendata"
This reverts commit da0738c661.
`ExportAndPublishDemarchesPubliqjesJob` is now schedulable
2022-12-20 12:52:56 +01:00
Christophe Robillard
672e56a099 schedule job during a no-busy time 2022-12-16 18:02:36 +01:00
Paul Chavard
ed4d5cb36a refactor(demarche): make declarative demarche processing syncroneous 2022-12-06 11:41:25 +01:00
Martin
ea8bd13bcf poc(batch_operation.purge): nettoie les batch terminé ou inutiles 2022-12-06 11:28:48 +01:00
Martin
eaf72162da poc(batch_operation): some rewrite to avoid various conflict (when an instructeur try to create a job with an incompatible dossier regarding the current task). also soome cleanup to isole spec in least involved model 2022-12-06 11:28:48 +01:00
Martin
4266ab93c5 poc(batch_operation): track dossier processed safely 2022-12-06 11:28:48 +01:00
Martin
beb39027d0 poc(batch_operation.ui): implement simple ui to trigger a batch of current page 2022-12-06 11:28:48 +01:00
Martin
7df86c50fb poc(batch_operations_controller): implement simple [not yet with procedure_presentation] action to create a batch operation 2022-12-06 11:28:48 +01:00
Martin
b11dbafc59 poc(batch_operation_job): implement archive dossiers with async behaviour, lock, run_at, finished_at, failed_dossier_ids, success_dossier_ids 2022-12-06 11:28:48 +01:00
Colin Darie
b13c5e56f6 refactor(piece_justificative): UX follows mockups 2022-12-05 10:47:10 +01:00
Paul Chavard
b89f6e2d53 feat(operation_log): add Cron::DossierOperationLogMoveToColdStorageJob 2022-11-22 18:06:05 +01:00
Kara Diaby
4d6ff768c4 Ajoute les dossiers déposés dans les statistiques Datagouv 2022-11-03 10:24:04 +01:00
Paul Chavard
1fd1878370 feat(jobs): add request_id to jobs payload 2022-10-12 14:32:23 +02:00
Damien Le Thiec
0131a41266
Merge branch 'main' into feature/add_rna_type_de_champs 2022-10-05 12:38:24 +02:00
Damien Le Thiec
0d9f02c88d First draft autofetch data for RNA 2022-10-04 22:11:01 +02:00
Christophe Robillard
da0738c661 unschedule export demarches opendata 2022-09-30 07:26:48 +02:00
Martin
d9432ccd3b fix(etablissement.as_degraded_mode): backfill missing data via a cron 2022-09-23 15:12:25 +02:00
Colin Darie
67cbc61e1e chore(services): update etablissement adresse & geocode when siret changes 2022-09-06 09:23:52 +02:00
Martin
45e0c15eb0 feat(PurgeManagerAdministrateurSessionsJob): also purge instructeur assign_tos 2022-08-23 13:28:10 +02:00
Kara Diaby
ec3118e82c Add concern for Datagouv schedulable jobs 2022-07-29 12:25:27 +02:00
Kara Diaby
a156529394 modify export descriptif demarches job 2022-07-29 11:17:22 +02:00
Kara Diaby
882ee74f88 Comptes créés avec FC par mois : CRON Job 2022-07-29 11:17:22 +02:00
Kara Diaby
dc1d0ce071 Démarches supprimées par mois : CRON Job 2022-07-29 11:17:22 +02:00
Kara Diaby
4a29162c6c Démarches closes par mois : CRON Job 2022-07-29 11:17:22 +02:00
Kara Diaby
999059269e Instructeurs connectés par mois : CRON Job 2022-07-29 11:17:21 +02:00
Kara Diaby
8e9d1eeb6f Nombre de comptes créés par mois : CRON 2022-07-29 11:17:21 +02:00
Kara Diaby
b48a48980a Nombre de dossiers créés par mois : CRON 2022-07-29 11:17:21 +02:00
Kara Diaby
9fa54c3cc8 Nombre de démarches créés par mois : CRON 2022-07-29 11:17:21 +02:00
Kara Diaby
e0dc36926e Nombre d'instructeurs créés par mois : CRON 2022-07-29 11:17:21 +02:00
Kara Diaby
a0a3c6c0ee Administrateurs crées par mois : CRON Job 2022-07-29 11:17:20 +02:00
Colin Darie
197fa54ea4 fix(archives): purge stuck pending archives
Cf 0cb096b3d6440a4da05ca2902ed6fa72a93e6579
2022-07-27 15:26:59 +02:00
Colin Darie
f1957e51f8 fix(exports): purge stuck (pending) exports, not generated or failed
Avec l'autre PR, ça reproduit le comportement d'avant, c'est à dire
que quoiqu'il arrive un export est purgé :
- soit 16h après sa génération (on a 16h pour le télécharger)
- soit 12h après sa création, et qu'il est bloqué

Auparavant, tous les exports étaient purgés au bout de 3h quelle que soit
le statut.
2022-07-27 15:26:59 +02:00
Martin
3e56fdd1d7 fix(export): when it takes more than 3 hours, exports are purge before being generated. make it possible to have an export that takes more than 3 hours and share this behaviour with kind of same class archive 2022-07-25 10:48:54 +02:00
Christophe Robillard
906dd4b509 remove useless DATAGOUV_TMP_DIR env 2022-07-21 21:54:15 +02:00
Christophe Robillard
0e3e6eb62a add schedulable? class method to cron jobs 2022-07-21 21:54:15 +02:00
Christophe Robillard
bed6167010 use specific namespace for datagouv cron jobs 2022-07-21 21:54:15 +02:00
Christophe Robillard
b6c96301ef export and publish opendata demarches 2022-07-21 21:54:15 +02:00
Martin
7fb85c97cb feat(Administrateur::ArchivesControllers): add archives #index and #create for admin 2022-07-04 14:18:46 +02:00
mfo
011fcd40d8
Merge pull request #7457 from betagouv/US/fix-webhook
fix(WebHookJob): missing find procedure
2022-06-10 17:30:28 +02:00
Martin
165db34c4a fix(WebHookJob): missing find procedure 2022-06-10 17:28:07 +02:00
Martin
b84c2966c4 fix(DeclarativeProceduresJob.perform_now): avoid to crash other demarche when one fail 2022-06-10 14:59:36 +02:00