This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/openwhisk-pluggable-provider.git
The following commit(s) were added to refs/heads/master by this push:
new 3e89db4 chore: fix spelling and grammar (#11)
3e89db4 is described below
commit 3e89db4fc6a2f4e17c98de3885ab0d09fe02a31f
Author: John Bampton <[email protected]>
AuthorDate: Wed Mar 10 02:12:12 2021 +1000
chore: fix spelling and grammar (#11)
---
CONTRIBUTING.md | 4 ++--
README.md | 6 +++---
actions/event-actions/lib/Database.js | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ab2f597..9c34a2b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,7 +19,7 @@
# Contributing to Apache OpenWhisk
-Anyone can contribute to the OpenWhisk project and we welcome your
contributions.
+Anyone can contribute to the OpenWhisk project, and we welcome your
contributions.
There are multiple ways to contribute: report bugs, improve the docs, and
contribute code, but you must follow these prerequisites and guidelines:
@@ -48,7 +48,7 @@ Please raise any bug reports on the respective project
repository's GitHub issue
list to see if your issue has already been raised.
A good bug report is one that make it easy for us to understand what you were
trying to do and what went wrong.
-Provide as much context as possible so we can try to recreate the issue.
+Provide as much context as possible, so we can try to recreate the issue.
### Discussion
diff --git a/README.md b/README.md
index 0eff375..1d3f281 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
# Apache OpenWhisk Pluggable Event Provider
-This projects contains a pluggable trigger feed event provider for Apache
OpenWhisk. It has a plugin architecture that allows event sources to be
integrated without having to re-write or maintain generic boilerplate. Event
sources just need to implement a simple interface, exposed as a Node.js module.
+This project contains a pluggable trigger feed event provider for Apache
OpenWhisk. It has a plugin architecture that allows event sources to be
integrated without having to re-write or maintain generic boilerplate. Event
sources just need to implement a simple interface, exposed as a Node.js module.
This event provider handles all the trigger registration, monitoring and
management services, leaving the event source plugin to handle listening to the
external event source and firing events. It based off the Cloudant trigger feed
package.
@@ -50,14 +50,14 @@ Upon starting the Pluggable Event Provider, the event
provider plugin (provided
The `trigger_manager` parameter exposes two async functions:
-- ` fireTrigger(id, params)` - fire trigger given by id passed into `add`
method with event parameters.
+- ` fireTrigger(id, params)` - fire trigger given by the id passed into `add`
method with event parameters.
- `disableTrigger(id, status_code, message)` - disable trigger feed due to
external event source issues.
Both functions handle the retry logic and error handling for those operations.
These should be used by the event provider plugin to fire triggers when events
arrive from external sources and then disable triggers due to external event
source issues.
### adding triggers
-When a new trigger is added to the trigger feeds' database, the details will
be passed to the `add` method. Trigger parameters will be used to set up
listening to the external event source. When external events occur, the
`trigger_manager` can be use to automatically fire triggers.
+When a new trigger is added to the trigger feeds' database, the details will
be passed to the `add` method. Trigger parameters will be used to set up
listening to the external event source. When external events occur, the
`trigger_manager` can be used to automatically fire triggers.
### removing triggers
diff --git a/actions/event-actions/lib/Database.js
b/actions/event-actions/lib/Database.js
index 71b57f3..ed2c6f9 100644
--- a/actions/event-actions/lib/Database.js
+++ b/actions/event-actions/lib/Database.js
@@ -23,17 +23,17 @@ module.exports = function(dbURL, dbName) {
this.db = nano.db.use(dbName);
var utilsDB = this;
- this.getWorkerID = function(availabeWorkers) {
+ this.getWorkerID = function(availableWorkers) {
return new Promise((resolve, reject) => {
- var workerID = availabeWorkers[0] || 'worker0';
+ var workerID = availableWorkers[0] || 'worker0';
- if (availabeWorkers.length > 1) {
+ if (availableWorkers.length > 1) {
utilsDB.db.view('triggerViews', 'triggers_by_worker', {reduce:
true, group: true}, function (err, body) {
if (!err) {
var triggersByWorker = {};
- availabeWorkers.forEach(worker => {
+ availableWorkers.forEach(worker => {
triggersByWorker[worker] = 0;
});