Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoOliveira committed Apr 1, 2024
1 parent 05ed35f commit 9d5e769
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/integrations/slicer/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/eduardooliveira/stLib/core/processing"
"github.com/eduardooliveira/stLib/core/runtime"
"github.com/eduardooliveira/stLib/core/state"
"github.com/eduardooliveira/stLib/core/system"
"github.com/labstack/echo/v4"
)

Expand Down Expand Up @@ -97,5 +98,6 @@ func upload(c echo.Context) error {
state.TempFiles[tempFile.UUID] = tempFile
}

system.Publish("tempfile.new", map[string]any{"name": name})
return c.NoContent(http.StatusOK)
}
4 changes: 2 additions & 2 deletions core/system/eventManagement.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (em *eventManagement) OnNewSub() error {
}

func (em *eventManagement) Read() chan *events.Message {
rtn := make(chan *events.Message, 100)
rtn := make(chan *events.Message, 1)
eventName := "system.state"
go func() {
for {
Expand All @@ -35,7 +35,7 @@ func (em *eventManagement) Read() chan *events.Message {
Event: eventName,
Data: m,
}:
log.Println("qweqwe")
log.Println("event sent")
default:
log.Println("status update channel full")
}
Expand Down

0 comments on commit 9d5e769

Please sign in to comment.