-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Mail user on TransactionStop and SuspendedEV event #1263
base: master
Are you sure you want to change the base?
Conversation
…nd(String subject, String body, String RecipientAddresses)" use addresses from setting if RecipientAddresses is empty; adding method "sendAsync(String subject, String body, String RecipientAddresses)"
…nded notification)" adding send mail to user (if email address is in the database), adding createContent method for user mail
…ublishing a event if the status is "SuspendedEV"
…tionStatusSuspendedEV notification) to send a mail to the user
…EV, rearange the if clauses
Steve tries infinitely to send mails for every tag without a user. After some time the server becomes unstable. |
@Zeppel: Thanks for the feedback. |
…r by transactionPk desc, to avoid fetching ghost transactions
…n case of no user is found by the OcppTag
@fnkbsi 1 entry in recipients OCPP-Tag is active and started the transcation without an user. Log attached - Exception occures 10x per second until a user is found, no mails will be send. If a user is selected for the tag afterwards, mails are send to the user and recipient email. Errors stop then. occurred location: Expected behavior: |
…tead with ScheduledExecutorService, so response to the chargepoint is not blocked.
@Zeppel: My hypothesis is, the exception blocks sending the response to transactionStop, so the charge box resend the transactionStop message and that leads to a loop. By catching the exception and calling the notification asynchronously it should now work. Thanks again for the feedback! |
…rBox, Integer connectorId); remove method getOcppTagOfActiveTransaction (Integer connectorPk)
…sitory and suppress sending a mail in the first minute
… add .orderBy(TRANSACTION.TRANSACTION_PK.desc()) to avoid fetching ghost transactions, fetch the latest
@goekay Please review, this PR is improving the product |
what if the user does not want to receive emails? |
Currently the mail-address must removed. I admit this works not with all business cases. Better solution would be to save the user decision in the DB. I can add a column to the user table or adding a new table (user_pk, send_mail), which should it be? update: with this commit the solution with a new column is added |
… a new row of the user table as comma separated list.
# resoled Conflicts: # src/main/resources/db/migration/V1_0_6__update.sql
Send a email to the transaction user in case of SuspendedEV and Transaction Stop, if the email address of the user is stored in the database.