-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cassandra Coyle <[email protected]>
- Loading branch information
Showing
4 changed files
with
91 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
# How-To Run Locally: | ||
# Scheduler Jobs | ||
|
||
To run locally as a process: `go run scheduler-jobs.go`, assuming you have a scheduler and dapr running accordingly (see below). | ||
## Overview | ||
|
||
Run Scheduler: | ||
![scheduler_debugger_config.png](scheduler_debugger_config.png) | ||
- schedule 100 oneshot jobs indefinitely (repeat = 1) | ||
- schedule 100 indefinite jobs indefinitely (repeat not set, trigger every 30s) | ||
- schedule repeat-job job indefinitely (repeat = 5, trigger every 1s due immediately) | ||
- indefinitely schedule and delete a create-delete-job job (repeat = 1, trigger every 1s) | ||
|
||
Run Dapr sidecar: | ||
![sidecar_debugger_config.png](sidecar_debugger_config.png) | ||
## How-To Run Locally: | ||
|
||
Run with dapr: | ||
```shell | ||
dapr run \ | ||
--app-id scheduler-jobs \ | ||
--app-port 8383 \ | ||
--dapr-grpc-port 3501 --app-protocol grpc \ | ||
--dapr-http-port 3500 --scheduler-host-address=127.0.0.1:50006 --app-channel-address=127.0.0.1 \ | ||
-- go run scheduler-jobs.go | ||
``` | ||
|
||
To run locally as a container: | ||
```shell | ||
docker build -t scheduler-jobs . | ||
docker run -p 3006:3006 --name scheduler-jobs scheduler-jobs # optionally add -d to run in background | ||
docker run -p 8383:8383 --name scheduler-jobs scheduler-jobs # optionally add -d to run in background | ||
# check container is running | ||
docker ps | ||
``` |
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
Binary file not shown.
Binary file not shown.