Skip to content

Conversation

@vbillard91
Copy link
Contributor

Description

Les TemplateProcessor largement utilisés dans le code ne sont pas thread safe au niveau des Lambda. On pourrait donc avoir des mélanges entre les paramètres de plusieurs utilisateurs lors de la génération de mail / notification / carte timeline etc… entre la langue, l’host, le thème ou le domaine => refactoring partiel pour corriger le problème. On conserve les anciennes API pour la retrocompatibilité avec les divers modules

Fixes

https://edifice-community.atlassian.net/browse/COCO-4672

Type of change

Please check options that are relevant.

  • Chore (PATCH)
  • Doc (PATCH)
  • Bug fix (PATCH)
  • New feature (MINOR)

@vbillard91 vbillard91 requested a review from juniorode October 8, 2025 14:29
{
if (resourceName != null && !resourceName.trim().isEmpty())
public void processTemplateWithLambdas(ProcessTemplateContext context, Handler<Writer> handler) {
context.lambdas(getLambdasFromRequest(context.request()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En passant par public void renderTemplateView(final HttpServerRequest request, JsonObject params, String resourceName, Reader r, final int status, Map<String, Mustache.Lambda> lambdas) { j'ai l'impression qu'on fait 2 fois le boulot de getLambdasFromRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oui c'et vrai

@vbillard91 vbillard91 force-pushed the fix-COCO-4672-template-processor-race-condition branch from d555e94 to 203bc65 Compare October 14, 2025 14:24
@jenkinsEdificePublic jenkinsEdificePublic force-pushed the develop-b2school branch 3 times, most recently from 17a826a to 257a49a Compare December 1, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants