diff options
author | 2019-02-25 16:58:42 +0100 | |
---|---|---|
committer | 2019-02-25 16:58:42 +0100 | |
commit | b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4 (patch) | |
tree | 6b6701cb37e024648b41cc9a6c4174eda35487f9 /src/stores/ServicesStore.js | |
parent | remove ping (diff) | |
download | ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.tar.gz ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.tar.zst ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.zip |
replace ms time strings with ms module
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index efd57a09d..c63bef196 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -5,6 +5,7 @@ import { | |||
5 | observable, | 5 | observable, |
6 | } from 'mobx'; | 6 | } from 'mobx'; |
7 | import { debounce, remove } from 'lodash'; | 7 | import { debounce, remove } from 'lodash'; |
8 | import ms from 'ms'; | ||
8 | 9 | ||
9 | import Store from './lib/Store'; | 10 | import Store from './lib/Store'; |
10 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
@@ -679,7 +680,7 @@ export default class ServicesStore extends Store { | |||
679 | _initRecipePolling(serviceId) { | 680 | _initRecipePolling(serviceId) { |
680 | const service = this.one(serviceId); | 681 | const service = this.one(serviceId); |
681 | 682 | ||
682 | const delay = 2000; | 683 | const delay = ms('2s'); |
683 | 684 | ||
684 | if (service) { | 685 | if (service) { |
685 | if (service.timer !== null) { | 686 | if (service.timer !== null) { |
@@ -700,7 +701,7 @@ export default class ServicesStore extends Store { | |||
700 | 701 | ||
701 | _reorderAnalytics = debounce(() => { | 702 | _reorderAnalytics = debounce(() => { |
702 | gaEvent('Service', 'order'); | 703 | gaEvent('Service', 'order'); |
703 | }, 5000); | 704 | }, ms('5s')); |
704 | 705 | ||
705 | _wrapIndex(index, delta, size) { | 706 | _wrapIndex(index, delta, size) { |
706 | return (((index + delta) % size) + size) % size; | 707 | return (((index + delta) % size) + size) % size; |