Commit graph

129 commits

Author SHA1 Message Date
simon lehericey
650a598698 ensure a buggy procedure does not block the others from being closed 2021-01-19 10:42:16 +01:00
Paul Chavard
97ce8f312b Use external_id to fetch annuaire_education data 2021-01-15 11:50:02 +01:00
Paul Chavard
5c9f2e8783 Add api education adapter and job 2021-01-14 17:57:48 +01:00
simon lehericey
1348b883e3 Add cron to complete missing analysis 2020-12-17 11:05:33 +01:00
kara Diaby
f3c4040d2d add grace period to deleted dossiers 2020-12-16 15:00:26 +01:00
Paul Chavard
3c6e30a326 Show titre identite link only once watermark is added 2020-12-10 16:50:03 +01:00
clemkeirua
513d4f6ff1 move all the cron jobs in a dedicated directory 2020-12-08 13:22:43 +00:00
simon lehericey
b187244a29 extract and refactor api errors 2020-12-04 17:07:30 +01:00
simon lehericey
46c355beb2 Add comments 2020-12-03 11:52:01 +01:00
simon lehericey
f56235c7ee retry exponentially on api entreprise timeout 2020-12-03 11:52:01 +01:00
simon lehericey
9eab310565 [#5675] for all api entreprise job, retry on 502, 503 2020-12-02 18:25:31 +01:00
Paul Chavard
18dfacb933 Make watermark configurable 2020-11-25 16:19:06 +01:00
Paul Chavard
371179dc5b Watermark titres identite 2020-11-25 16:19:06 +01:00
simon lehericey
c563956a9f retry each day during 5 days to fetch attestation social 2020-10-28 15:53:58 +00:00
simon lehericey
ad01d4dee5 really faster stats by precomputing some of them 2020-10-06 16:12:01 +02:00
clemkeirua
245e9e59c7 do not run ApiEntreprise jobs on missing etablissements 2020-09-28 17:36:38 +02:00
Paul Chavard
dea78c49f6 Run jobs in named queues 2020-09-23 08:22:17 +02:00
simon lehericey
5459c2fa7f Fix uninitialized excon constant 2020-09-08 18:36:24 +02:00
Pierre de La Morinerie
292dc84eb4 jobs: ignore deleted file in Virus Scan
We have errors in production where the job starts correctly (i.e. the
blob exists), but `blob.open` fails with a `ActiveStorage::FileNotFound`
error.

When checking later in production, the blob has been deleted.

This points to the blob (and the file) being deleted during the virus
scan job.

In that case, ignore the error (rather than retrying the job).
2020-09-03 11:00:59 +02:00
simon lehericey
49aa426d1b application job swallow BadRequest error and retry 2020-09-02 16:59:54 +02:00
Paul Chavard
5ceae8235b Ignore type_de_champ procedure_id 2020-09-02 11:26:26 +02:00
Paul Chavard
ec72fdd164 Remove migration service 2020-09-02 11:26:26 +02:00
Pierre de La Morinerie
3c91cfc83c jobs: add health-related keywords to dubious procedures scanner
We are not certified for hosting health-related data yet.
2020-08-25 12:04:10 +00:00
Christophe Robillard
f2dcb61521 transform job in task for set dossiers_last_updated_at 2020-08-12 16:10:15 +02:00
Pierre de La Morinerie
54a4db1c47 config: flip config.active_storage.queues
ActiveStorage jobs are now moved to their own queue.

For consistency, we also move our own analysis jobs (VirusScannerJob)
on the same `:active_storage_analysis` queue.
2020-08-05 16:48:36 +02:00
clemkeirua
952a43058f last_commentaire_updated_at does not take system email into account 2020-07-30 11:52:41 +02:00
clemkeirua
153c6aebd7 add temp job to set last_updated_at_* values for dossier
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2020-07-30 10:31:14 +02:00
Paul Chavard
bb5a90da76 fix active_revision_id -> active_revision.id 2020-07-23 15:07:25 +02:00
Paul Chavard
7d421d471c Fix revision migration job 2020-07-23 09:56:34 +02:00
Paul Chavard
bc09b61684 Add migration service and task 2020-07-21 19:35:30 +02:00
Pierre de La Morinerie
7a67f1a802 jobs: ignore missing blob during virus scan
We currently have many failed VirusScannerJob enqueued, because the
underlying blob is missing.

This PR fixes the issue by discarding the job in those cases (because if
the blob is gone, the job is never going to succeed).

The implementation is based on a similar issue encoutered by the
ActiveStorage::AnalyzeJob. See 06f8baf73c
2020-07-13 14:35:41 +02:00
Christophe Robillard
d20d91bc07 no sentry reporting for api-entreprise 2020-07-08 17:58:33 +02:00
Christophe Robillard
954d41ce4e fetch effectifs mensuels for may month 2020-06-24 10:23:00 +02:00
Paul Chavard
e89f0846bb Fix job max attempts 2020-06-16 15:57:18 +02:00
Christophe Robillard
f8b170836c report to sentry for BadFormatRequest and ResourceNotFound exceptions 2020-06-11 23:09:50 +02:00
Christophe Robillard
b90513f456 no sentry report when error 400 for exercices 2020-06-11 18:16:19 +02:00
Paul Chavard
c4896b45ad Prepare to remove dossier procedure_id 2020-06-11 16:13:44 +02:00
Christophe Robillard
8df9ae3a8d ask only effectifs for april 2020-06-10 17:41:13 +02:00
Christophe Robillard
6535324ae9 ask effectifs only for 2020/02 2020-06-04 09:18:01 +02:00
Christophe Robillard
705487dab6 define max_attempts for jobs 2020-06-02 20:21:11 +02:00
Christophe Robillard
8c66b2cab1 rescue ResourceNotFound and BadFormatRequest errors
we don't have to retry this kind of errors, but just to send it to
sentry
2020-05-20 11:09:54 +02:00
Christophe Robillard
f4ebb5d107 create api_entreprise jobs 2020-05-20 11:09:54 +02:00
Paul Chavard
fcd136c566 Enable deletion of expired dossiers en_construction
fix #4977
2020-04-21 10:41:54 +02:00
Paul Chavard
61eaca928f remove WarnExpiringDossiersJob 2020-04-09 11:11:51 +02:00
Paul Chavard
6dc1f3e2c4 Use human readable expressions instead of cron gibberish
https://github.com/floraison/fugit#fugitnat
2020-04-07 12:44:58 +02:00
Paul Chavard
58c126308c Add DiscardedProceduresDeletionJob job 2020-03-31 17:08:28 +02:00
Paul Chavard
742cc15209 Use base CronJob 2020-03-31 12:25:46 +02:00
Paul Chavard
5005c54891 Add base cron job 2020-03-31 12:25:46 +02:00
Paul Chavard
33bf2fe109 remove deprecated AutoReceiveDossiersForProcedureJob 2020-03-31 12:25:46 +02:00
Paul Chavard
39c47c21cf Remove explicit queue_as :default 2020-03-31 12:01:42 +02:00