-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dépôt de besoin] Envoyer en asynchrone les besoins validés #998
Conversation
f68c1df
to
009ca22
Compare
084501a
to
6be2f87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
if settings.BITOUBI_ENV == "prod": | ||
api_hubspot.create_deal_from_tender(tender=obj) | ||
obj.set_validated() | ||
self.message_user(request, "Ce dépôt de besoin a été validé. Il sera envoyé en temps voulu :)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
# Send Tenders who are validated but not sent | ||
|
||
# Do not run if this env var is not set: | ||
if [[ -z "$CRON_TENDER_SEND_VALIDATED_ENABLED" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'adore cette possibilité de débrayer !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seul hic, c'est qu'il n'y a pas d'option intermédiaire (désactiver le cron mais permettre l'envoi manuel 🤔 )
4dd020e
to
bcabdbb
Compare
f73a3fd
to
0c196af
Compare
Suite de #997
Quoi ?
Les besoins validés via l'admin ne sont plus envoyés automatiquement.
C'est cette nouvelle management commande
send_validated_tenders
qui sera chargée de le faire.Ajout dans le cron avec
*/5 9-17 * * 1-5
= Every 5 minutes from 9am through 5pm on Monday through Fridayhttps://cron.help/#*/5_9-17_*_*_1-5