Skip to content

Commit 520b705

Browse files
committed
Fix max queue default not used and increase to 20
1 parent 66524bb commit 520b705

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ The OpenSlides search service.
44

55
## Configuration:
66

7-
8-
| Env variable | Default value | Meaning |
9-
| ------------------------------- | -------------------------- | ------- |
10-
| `OPENSLIDES_LOG_LEVEL` | `info` | Log level. Can be panic, fatal, error, warn, info, debug, trace |
11-
| `SEARCH_PORT` | `9050` | Port the service listens on. |
12-
| `SEARCH_LISTEN_HOST` | `` | Host the service is bound to. |
13-
| `SEARCH_MAX_QUEUED` | `5` | Number of waiting queries. |
14-
| `SEARCH_INDEX_AGE` | `100ms` | Accepted age of internal index. |
15-
| `SEARCH_INDEX_FILE` | `search.bleve` | Filename of the internal index. |
16-
| `SEARCH_INDEX_BATCH` | `4096` | Batch size of the index when its build or re-generated. |
17-
| `SEARCH_INDEX_UPDATE_INTERVAL` | `120s` | Poll intervall to update the index without queries. |
18-
| `MODELS_YML_FILE` | `models.yml` | File path of the used models. |
19-
| `SEARCH_YML_FILE` | `search.yml` | Fields of the models to be searched. |
20-
| `DATABASE_NAME` | `openslides` | Name of the database. |
21-
| `DATABASE_USER` | `openslides` | Database user. |
22-
| `DATABASE_HOST` | `localhost` | Host of the database. |
23-
| `DATABASE_PORT` | `5432` | Port of the database. |
24-
| `DATABASE_PASSWORD_FILE` | `/run/secrets/postgres_password` | Password file of the database user. |
25-
| `RESTRICTER_URL` | `http://autoupdate:9012/internal/autoupdate` | URL to use the restricter from the auto-update-service to filter the query results.|
7+
| Env variable | Default value | Meaning |
8+
| ------------------------------ | -------------------------------------------- | ----------------------------------------------------------------------------------- |
9+
| `OPENSLIDES_LOG_LEVEL` | `info` | Log level. Can be panic, fatal, error, warn, info, debug, trace |
10+
| `SEARCH_PORT` | `9050` | Port the service listens on. |
11+
| `SEARCH_LISTEN_HOST` | `` | Host the service is bound to. |
12+
| `SEARCH_MAX_QUEUED` | `20` | Number of waiting queries. |
13+
| `SEARCH_INDEX_AGE` | `100ms` | Accepted age of internal index. |
14+
| `SEARCH_INDEX_FILE` | `search.bleve` | Filename of the internal index. |
15+
| `SEARCH_INDEX_BATCH` | `4096` | Batch size of the index when its build or re-generated. |
16+
| `SEARCH_INDEX_UPDATE_INTERVAL` | `120s` | Poll intervall to update the index without queries. |
17+
| `MODELS_YML_FILE` | `models.yml` | File path of the used models. |
18+
| `SEARCH_YML_FILE` | `search.yml` | Fields of the models to be searched. |
19+
| `DATABASE_NAME` | `openslides` | Name of the database. |
20+
| `DATABASE_USER` | `openslides` | Database user. |
21+
| `DATABASE_HOST` | `localhost` | Host of the database. |
22+
| `DATABASE_PORT` | `5432` | Port of the database. |
23+
| `DATABASE_PASSWORD_FILE` | `/run/secrets/postgres_password` | Password file of the database user. |
24+
| `RESTRICTER_URL` | `http://autoupdate:9012/internal/autoupdate` | URL to use the restricter from the auto-update-service to filter the query results. |

pkg/config/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
const (
1919
DefaultWebPort = 9050
2020
DefaultWebHost = ""
21-
DefaultMaxQueue = 5
21+
DefaultMaxQueue = 20
2222
DefaultIndexAge = 100 * time.Millisecond
2323
DefaultIndexFile = "search.bleve"
2424
DefaultIndexUpdate = 2 * time.Minute
@@ -86,8 +86,9 @@ func GetConfig() (*Config, error) {
8686
cfg := &Config{
8787
LogLevel: logrus.InfoLevel,
8888
Web: Web{
89-
Port: DefaultWebPort,
90-
Host: DefaultWebHost,
89+
Port: DefaultWebPort,
90+
Host: DefaultWebHost,
91+
MaxQueue: DefaultMaxQueue,
9192
},
9293
Index: Index{
9394
File: DefaultIndexFile,

0 commit comments

Comments
 (0)