Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Dec 12, 2023
1 parent 08a3a28 commit cf10f64
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/buildTestPublishContainerDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- expiration
release:
types:
- published
Expand Down
7 changes: 5 additions & 2 deletions docs/docs/api/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,23 @@ The API operates on following notification data model fields:
<tr>
<td>
<p class="name">asyncBroadcastPushNotification</p>
<div class="description">this field determines if the API call to create an immediate (i.e. not future-dated) broadcast push notification is asynchronous or not. If omitted, the API call is synchronous, i.e. the API call blocks until all subscribers have been processed. If set, valid values and corresponding behaviors are
<div class="description">this field determines if the API call to create an immediate (i.e. not future-dated) broadcast push notification is asynchronous or not. If omitted, the API call is synchronous, i.e. the API call blocks until notifications to all subscribers have been dispatched. If set, valid values and corresponding behaviors are
<ul>
<li>true - async without callback</li>
<li>false - sync </li>
<li>a string contain callback url - async with callback of the supplied url upon completion</li>
<li>a string containing callback url - async with a POST call to the supplied callback url upon completion</li>
</ul>
When posting to a service with large number of subscribers, it is highly <b>recommended</b> to set the API call to asynchronous, i.e. setting the value to <i>true</i> or supplying a callback.
</div>
</td>
<td>
<table>
<tr><td>type</td><td>string or boolean</td></tr>
<tr><td>required</td><td>false</td></tr>
<tr><td>default</td><td>false</td></tr>
</table>
</td>

</tr>
<tr>
<td>
Expand Down
8 changes: 3 additions & 5 deletions docs/docs/config/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ module.exports = {
datastore: 'ioredis',
clientOptions: {
name: 'mymaster',
sentinels: [{host: '127.0.0.1', port: 26379}],
sentinels: [{ host: '127.0.0.1', port: 26379 }],
},
},
},
};
```

Throttle is implemented using [Bottleneck](https://github.com/SGrondin/bottleneck) and [ioredis](https://github.com/luin/ioredis). See their documentations for more configurations.

When _NotifyBC_ is deployed to Kubernetes using Helm, by default throttle, if enabled, uses Redis Sentinel therefore rate limit applies to whole cluster.
!!!include(./docs/shared/throttle.md)!!!

## Inbound SMTP Server

Expand Down Expand Up @@ -233,7 +231,7 @@ To disable list-unsubscribe by email, set _email.listUnsubscribeByEmail.enabled_
```js
module.exports = {
email: {
listUnsubscribeByEmail: {enabled: false},
listUnsubscribeByEmail: { enabled: false },
},
};
```
6 changes: 2 additions & 4 deletions docs/docs/config/sms.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,14 @@ module.exports = {
datastore: 'ioredis',
clientOptions: {
name: 'mymaster',
sentinels: [{host: '127.0.0.1', port: 26379}],
sentinels: [{ host: '127.0.0.1', port: 26379 }],
},
},
},
};
```

Throttle is implemented using [Bottleneck](https://github.com/SGrondin/bottleneck) and [ioredis](https://github.com/luin/ioredis). See their documentations for more configurations.

When _NotifyBC_ is deployed to Kubernetes using Helm, by default throttle uses Redis Sentinel therefore rate limit applies to whole cluster.
!!!include(./docs/shared/throttle.md)!!!

To disable throttle, set _sms.throttle.enabled_ to _false_ in file /src/config.local.js

Expand Down
3 changes: 3 additions & 0 deletions docs/docs/shared/throttle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Throttle is implemented using [Bottleneck](https://github.com/SGrondin/bottleneck) and [ioredis](https://github.com/luin/ioredis). See their documentations for more configurations. The only deviation made by _NotifyBC_ is using _jobExpiration_ to denote Bottleneck _expiration_ job option with a default value of 2min as defined in [config.ts](https://github.com/bcgov/NotifyBC/blob/main/src/config.ts).

When _NotifyBC_ is deployed to Kubernetes using Helm, by default throttle, if enabled, uses Redis Sentinel therefore rate limit applies to whole cluster.

0 comments on commit cf10f64

Please sign in to comment.