Skip to content

Commit

Permalink
fix: email settings was missing from the config setup (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
  • Loading branch information
golanglemonade authored Sep 29, 2024
1 parent 719bfa8 commit df941cf
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 6 deletions.
4 changes: 4 additions & 0 deletions config/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
RIVERBOAT_REFRESHINTERVAL="10m"
RIVERBOAT_JOBQUEUE_DATABASEHOST="postgres://postgres:password@0.0.0.0:5432/jobs?sslmode=disable"
RIVERBOAT_JOBQUEUE_QUEUES=""
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_DEVMODE="true"
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_TESTDIR="fixtures/email"
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_TOKEN=""
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_FROMEMAIL="no-reply@example.com"
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_ENABLED="true"
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_BASEURL="http://localhost:1337"
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_ENDPOINT="query"
Expand Down
9 changes: 5 additions & 4 deletions config/config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobQueue:
enabled: true
endpoint: query
emailWorker:
devMode: true
fromEmail: no-reply@example.com
testDir: fixtures/email
token: ""
email:
devMode: true
fromEmail: no-reply@example.com
testDir: fixtures/email
token: ""
refreshInterval: 600000000000
4 changes: 4 additions & 0 deletions config/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ data:
RIVERBOAT_REFRESHINTERVAL: {{ .Values.riverboat.refreshInterval | default "10m" }}
RIVERBOAT_JOBQUEUE_DATABASEHOST: {{ .Values.riverboat.jobQueue.databaseHost | default "postgres://postgres:password@0.0.0.0:5432/jobs?sslmode=disable" }}
RIVERBOAT_JOBQUEUE_QUEUES: {{ .Values.riverboat.jobQueue.queues }}
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_DEVMODE: {{ .Values.riverboat.jobQueue.workers.emailWorker.devMode | default true }}
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_TESTDIR: {{ .Values.riverboat.jobQueue.workers.emailWorker.testDir | default "fixtures/email" }}
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_TOKEN: {{ .Values.riverboat.jobQueue.workers.emailWorker.token }}
RIVERBOAT_JOBQUEUE_WORKERS_EMAILWORKER_FROMEMAIL: {{ .Values.riverboat.jobQueue.workers.emailWorker.fromEmail | default "no-reply@example.com" }}
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_ENABLED: {{ .Values.riverboat.jobQueue.workers.databaseWorker.config.enabled | default true }}
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_BASEURL: {{ .Values.riverboat.jobQueue.workers.databaseWorker.config.baseUrl | default "http://localhost:1337" }}
RIVERBOAT_JOBQUEUE_WORKERS_DATABASEWORKER_CONFIG_ENDPOINT: {{ .Values.riverboat.jobQueue.workers.databaseWorker.config.endpoint | default "query" }}
Expand Down
10 changes: 10 additions & 0 deletions configgen/api-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ Workers that will be enabled on the server

**Properties**

|Name|Type|Description|Required|
|----|----|-----------|--------|
|[**email**](#jobqueueworkersemailworkeremail)|`object`|||

**Additional Properties:** not allowed
<a name="jobqueueworkersemailworkeremail"></a>
##### jobQueue\.workers\.emailWorker\.email: object

**Properties**

|Name|Type|Description|Required|
|----|----|-----------|--------|
|**devMode**|`boolean`|enable dev mode<br/>||
Expand Down
12 changes: 11 additions & 1 deletion configgen/riverboat.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"additionalProperties": false,
"type": "object"
},
"jobs.EmailWorker": {
"jobs.EmailConfig": {
"properties": {
"devMode": {
"type": "boolean",
Expand All @@ -61,6 +61,16 @@
"additionalProperties": false,
"type": "object"
},
"jobs.EmailWorker": {
"properties": {
"email": {
"$ref": "#/$defs/jobs.EmailConfig",
"description": "the email configuration"
}
},
"additionalProperties": false,
"type": "object"
},
"river.Config": {
"properties": {
"databaseHost": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/jobs/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (EmailArgs) Kind() string { return "email" }
type EmailWorker struct {
river.WorkerDefaults[EmailArgs]

EmailConfig
EmailConfig `koanf:"email" json:"email" jsonschema:"description=the email configuration"`
}

// EmailConfig contains the configuration for the email worker
Expand Down

0 comments on commit df941cf

Please sign in to comment.