Use Job Concurrency.
This commit is contained in:
parent
a2cc2b7781
commit
638a1e7319
@ -4,6 +4,7 @@ redis_url: redis://redis:6379
|
|||||||
relay_bind: 0.0.0.0:8080
|
relay_bind: 0.0.0.0:8080
|
||||||
relay_domain: relay.toot.yukimochi.jp
|
relay_domain: relay.toot.yukimochi.jp
|
||||||
relay_servicename: YUKIMOCHI Toot Relay Service
|
relay_servicename: YUKIMOCHI Toot Relay Service
|
||||||
|
job_concurrency: 50
|
||||||
# relay_summary: |
|
# relay_summary: |
|
||||||
|
|
||||||
# relay_icon: https://
|
# relay_icon: https://
|
||||||
|
@ -33,6 +33,7 @@ redis_url: redis://redis:6379
|
|||||||
relay_bind: 0.0.0.0:8080
|
relay_bind: 0.0.0.0:8080
|
||||||
relay_domain: relay.toot.yukimochi.jp
|
relay_domain: relay.toot.yukimochi.jp
|
||||||
relay_servicename: YUKIMOCHI Toot Relay Service
|
relay_servicename: YUKIMOCHI Toot Relay Service
|
||||||
|
job_concurrency: 50
|
||||||
# relay_summary: |
|
# relay_summary: |
|
||||||
|
|
||||||
# relay_icon: https://
|
# relay_icon: https://
|
||||||
@ -48,6 +49,7 @@ relay_servicename: YUKIMOCHI Toot Relay Service
|
|||||||
- `RELAY_BIND` (ex. `0.0.0.0:8080`)
|
- `RELAY_BIND` (ex. `0.0.0.0:8080`)
|
||||||
- `RELAY_DOMAIN` (ex. `relay.toot.yukimochi.jp`)
|
- `RELAY_DOMAIN` (ex. `relay.toot.yukimochi.jp`)
|
||||||
- `RELAY_SERVICENAME` (ex. `YUKIMOCHI Toot Relay Service`)
|
- `RELAY_SERVICENAME` (ex. `YUKIMOCHI Toot Relay Service`)
|
||||||
|
- `JOB_CONCURRENCY` (ex. `50`)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay?ref=badge_large)
|
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fyukimochi%2FActivity-Relay?ref=badge_large)
|
@ -63,6 +63,7 @@ func initConfig() {
|
|||||||
viper.BindEnv("relay_bind")
|
viper.BindEnv("relay_bind")
|
||||||
viper.BindEnv("relay_domain")
|
viper.BindEnv("relay_domain")
|
||||||
viper.BindEnv("relay_servicename")
|
viper.BindEnv("relay_servicename")
|
||||||
|
viper.BindEnv("job_concurrency")
|
||||||
} else {
|
} else {
|
||||||
Actor.Summary = viper.GetString("relay_summary")
|
Actor.Summary = viper.GetString("relay_summary")
|
||||||
Actor.Icon = activitypub.Image{URL: viper.GetString("relay_icon")}
|
Actor.Icon = activitypub.Image{URL: viper.GetString("relay_icon")}
|
||||||
@ -112,7 +113,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
workerID := uuid.NewV4()
|
workerID := uuid.NewV4()
|
||||||
worker := machineryServer.NewWorker(workerID.String(), 20)
|
worker := machineryServer.NewWorker(workerID.String(), viper.GetInt("job_concurrency"))
|
||||||
err = worker.Launch()
|
err = worker.Launch()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user