Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit a7004a0

Browse files
committed
feat: startupOrder attribute
1 parent be1eb12 commit a7004a0

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/step.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@ export class Step extends Service {
99
return 'kronos-step';
1010
}
1111

12+
/**
13+
* Order in which the step should be started.
14+
* Higher numbers result in earlier startup
15+
* @retrun {number} 1.0
16+
*/
17+
static get startupOrder() {
18+
return 1.0;
19+
}
20+
21+
/**
22+
* Order in which the step should be started.
23+
* Higher numbers result in earlier startup
24+
* return {number} delivered from the constructors startupOrder
25+
*/
26+
get startupOrder() {
27+
return this.constructor.startupOrder;
28+
}
29+
1230
/**
1331
* @return {String} separator between step name and endpoint name
1432
**/

tests/step-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ test('step static', t => {
6060
t.is(step.name, 'myStep2');
6161
t.is(step.type, 'out-step');
6262
t.is(step.description, 'my out-step description');
63+
t.is(step.startupOrder, 1.0);
6364
});
6465

6566
test('step start/stop', async t => {

0 commit comments

Comments
 (0)