-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add dev-test-send-line command to Makefile and script/run.sh
- Loading branch information
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package main | ||
|
||
import ( | ||
"bikefest/pkg/bootstrap" | ||
"bikefest/pkg/service" | ||
"context" | ||
"fmt" | ||
) | ||
|
||
func main() { | ||
// init config | ||
app := bootstrap.App() | ||
|
||
// init services | ||
// userService := service.NewUserService(app.Conn, app.Cache) | ||
notifyService := service.NewAsynqService(app.AsynqClient, app.AsynqInspector, app.Env) | ||
ctx := context.Background() | ||
|
||
fmt.Println("Enter your user ID: ") | ||
var userID string | ||
_, err := fmt.Scan(&userID) | ||
if err != nil { | ||
panic(err) | ||
} | ||
fmt.Println("Enter your event ID: ") | ||
var eventID string | ||
_, err = fmt.Scan(&eventID) | ||
if err != nil { | ||
panic(err) | ||
} | ||
println("Enter your event start time: ") | ||
var eventStartTime string | ||
_, err = fmt.Scan(&eventStartTime) | ||
if err != nil { | ||
panic(err) | ||
} | ||
err = notifyService.EnqueueEventNotification(ctx, userID, eventID, eventStartTime) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters