21 Commits

Author SHA1 Message Date
c35ca3dbeb
DX: fix cs 2023-02-28 22:39:33 +01:00
a16244a3f5 Feature: [docgen] generate documents in an async queue
The documents are now generated in a queue, using symfony messenger. This queue should be configured:

```yaml
# app/config/messenger.yaml
framework:
    messenger:
        # reset services after consuming messages
        # reset_on_message: true

        failure_transport: failed

        transports:
            # https://symfony.com/doc/current/messenger.html#transport-configuration
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
            priority:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
            failed: 'doctrine://default?queue_name=failed'

        routing:
            # ... other messages
            'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
```

`StoredObject`s now have additionnal properties:

* status (pending, failure, ready (by default) ), which explain if the document is generated;
* a generationTrialCounter, which is incremented on each generation trial, which prevent each generation more than 5 times;

The generator computation is moved from the `DocGenTemplateController` to a `Generator` (implementing `GeneratorInterface`. 

There are new methods to `Context` which allow to normalize/denormalize context data to/from a messenger's `Message`.
2023-02-28 15:25:47 +00:00
9699e2304a fix cs: declare type and license header mismatch 2022-10-06 22:25:43 +02:00
67c3f3a840 fix cs with licencse header 2022-10-05 17:08:14 +02:00
nobohan
0a4ef3ad22 php code style + upd CHANGELOG 2022-05-27 09:39:36 +02:00
nobohan
dea554ced4 storedObject: add title field on StoredObject entity 2022-05-25 16:32:52 +02:00
c8e5ba4738 phpcsfixes 2022-02-11 16:04:01 +01:00
0fd26da299 comments in migration removed 2022-02-11 16:04:00 +01:00
1c055e842e created and updated traits added + template property added to Document entity 2022-02-11 16:04:00 +01:00
Pol Dellaiera
8f96a1121d
cs: Fix code style (safe rules only). 2021-11-23 14:08:50 +01:00
9fb29ec110 refactor search for using search by pertinence 2021-11-22 08:28:22 +00:00
7fabe0214e household list of accompanying periods + upgrade DBAL version to 3.1 2021-11-08 10:57:14 +00:00
2c1d3d08c3 temporary stored object fixes 2021-09-29 15:15:10 +02:00
Pol Dellaiera
ba53ce40fa Add migration file. 2021-09-28 20:32:43 +02:00
f0d0f16d3c fix namespace in migration files 2021-09-24 16:36:36 +02:00
832c7bab9f last migration deleted: duplicate 2021-09-24 16:20:58 +02:00
78b56dc32d attempt to fix migrations 2021-09-24 16:04:32 +02:00
88c192c22e change namespace migration 2021-09-09 17:44:37 +02:00
b11592fb6d templates added and adapted, still problems with scope 2021-09-03 16:05:55 +02:00
3bb0e470bc entity recreated + repository + migration done 2021-09-03 11:26:04 +02:00
eaa0ad925f fix folder name 2021-03-18 13:37:13 +01:00