Skip to content

Commit 915b3c1

Browse files
committed
Add message
1 parent 895136b commit 915b3c1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

internal/schedule/setup.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func setupRun(
104104
logger.Info("")
105105
logger.Info("⚡ Setting up Transaction Scheduler Manager...")
106106

107+
// Transaction checks if manager exists and only creates it if needed
107108
setupTx := fmt.Sprintf(`import FlowTransactionSchedulerUtils from %s
108109
109110
transaction() {
@@ -144,10 +145,16 @@ transaction() {
144145
// Log success with styled output
145146
logger.Info("")
146147
successIcon := branding.GreenStyle.Render("✅")
147-
successMsg := branding.GreenStyle.Render("Transaction Scheduler Manager setup successfully!")
148+
successMsg := branding.GreenStyle.Render("Transaction Scheduler Manager is setup")
148149
logger.Info(fmt.Sprintf("%s %s", successIcon, successMsg))
149150

151+
logger.Info("")
152+
noteIcon := branding.GrayStyle.Render("📝")
153+
noteText := branding.GrayStyle.Render("Note: If the manager already existed, no changes were made")
154+
logger.Info(fmt.Sprintf("%s %s", noteIcon, noteText))
155+
150156
if txResult.TransactionID.String() != "" {
157+
logger.Info("")
151158
txIDLabel := branding.GrayStyle.Render("Transaction ID:")
152159
txID := branding.PurpleStyle.Render(txResult.TransactionID.String())
153160
logger.Info(fmt.Sprintf(" %s %s", txIDLabel, txID))
@@ -166,9 +173,9 @@ type setupResult struct {
166173

167174
func (r *setupResult) JSON() any {
168175
return map[string]any{
169-
"success": r.success,
170-
"transactionID": r.transactionID,
171-
"message": "Transaction Scheduler Manager setup successfully",
176+
"success": r.success,
177+
"transactionID": r.transactionID,
178+
"message": "Transaction Scheduler Manager is ready",
172179
}
173180
}
174181

@@ -178,5 +185,5 @@ func (r *setupResult) String() string {
178185
}
179186

180187
func (r *setupResult) Oneliner() string {
181-
return "Transaction Scheduler Manager setup successfully"
188+
return "Transaction Scheduler Manager is ready"
182189
}

0 commit comments

Comments
 (0)