Add number of units to the delay node (rate) (#994)

* Add possibility to set the value for the rate unit

Backward compatible, if the new nbRateUnits is not set, default to 1.
This way we can delay messages to 1 msg per X seconds/minutes/hours days
instead of always 1.
Useful when interacting with API that have a uncommon rate limiting like
1req per 2 seconds.

* Fix existing testing for delay

* Add new test for the nbRateUnits

* Fix label for timed and topic for delay node

* Schrink width of Units delay rate

* pluralisation of labels

* Dynamic pluralisation respecting i18n

* Remove debug data left
This commit is contained in:
Antoine Aflalo
2016-09-16 09:27:14 -04:00
committed by Nick O'Leary
parent e4c951984a
commit ea8c6d5cce
4 changed files with 89 additions and 22 deletions

View File

@@ -200,7 +200,25 @@
"limit": "limit",
"random": "random",
"queue": "queue",
"timed": "releases per"
"timed": "releases per",
"units" : {
"second": {
"plural" : "Seconds",
"singular": "Second"
},
"minute": {
"plural" : "Minutes",
"singular": "Minute"
},
"hour": {
"plural" : "Hours",
"singular": "Hour"
},
"day": {
"plural" : "Days",
"singular": "Day"
}
}
},
"error": {
"buffer": "buffer exceeded 1000 messages",