Skip to content

Commit 5d15afc

Browse files
committed
fix(cli): log schedule triggers during suga dev
1 parent 786f8e5 commit 5d15afc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/internal/simulation/service/service.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"time"
1414

1515
"github.com/nitrictech/suga/cli/internal/netx"
16+
"github.com/nitrictech/suga/cli/internal/style"
1617
"github.com/nitrictech/suga/cli/pkg/schema"
1718
"github.com/robfig/cron/v3"
1819
)
@@ -135,6 +136,7 @@ func (s *ServiceSimulation) startSchedules(stdoutWriter, stderrorWriter io.Write
135136
}
136137

137138
_, err := cron.AddFunc(cronExpression, func() {
139+
fmt.Printf("%s triggering %s POST %s\n", style.Purple(fmt.Sprintf("[%s.%s] cron:%s", s.name, triggerName, cronExpression)), style.Teal(fmt.Sprintf("[%s]", s.name)), trigger.Path)
138140
req, err := http.NewRequest(http.MethodPost, url.String(), nil)
139141
if err != nil {
140142
// log the error

0 commit comments

Comments
 (0)