Added temperature exceded event

This commit is contained in:
Nedim
2023-10-16 19:43:35 +02:00
parent 44efa194fc
commit 2e60460131
7 changed files with 109 additions and 70 deletions

View File

@@ -11,6 +11,7 @@ import (
"gitlab.com/pactual1/backend/services/blockchain"
"gitlab.com/pactual1/backend/services/contract"
"gitlab.com/pactual1/backend/services/erp"
"gitlab.com/pactual1/backend/services/messaging"
"gitlab.com/pactual1/backend/shared"
"github.com/gin-gonic/gin"
@@ -67,7 +68,11 @@ func main() {
contractChannel := make(chan string)
// Start services and pass the respective channels
// go messaging.MessagingService(messagingChannel)
notificationCh := make(chan models.Notification, 100)
// Create a new messaging service
messagingService := messaging.NewService(notificationCh, shared.GetDb())
// Run the messaging service
go messagingService.MessagingService()
go erp.ERPService(erpChannel)
encryptionClient := shared.NewEncryptionClient(config.AppConfig.Service.BlockchainSecret)