1
- import type { Awaitable , Constructor } from '@ora-io/utils'
1
+ import type { Awaitable , Constructor , Milliseconds } from '@ora-io/utils'
2
2
import type { StoreManager } from '../store/storemanager'
3
3
import type { Context } from './context'
4
4
import { TaskBase } from './base'
@@ -9,8 +9,8 @@ export abstract class TaskStorable extends TaskBase {
9
9
// overwrite these for store key customize
10
10
static readonly taskPrefix : string = 'Task:'
11
11
static readonly taskPrefixDone : string = 'Done-Task:'
12
- static readonly taskTtl : number | undefined = undefined
13
- static readonly taskTtlDone : number | undefined = undefined
12
+ static readonly taskTtl : Milliseconds | undefined = undefined
13
+ static readonly taskTtlDone : Milliseconds | undefined = undefined
14
14
15
15
getTaskPrefix ( _context ?: Context ) : Awaitable < string > {
16
16
return ( this . constructor as TypeofTaskStorable ) . taskPrefix
@@ -20,19 +20,19 @@ export abstract class TaskStorable extends TaskBase {
20
20
return ( this . constructor as TypeofTaskStorable ) . taskPrefixDone
21
21
}
22
22
23
- get taskTtl ( ) : number | undefined {
23
+ get taskTtl ( ) : Milliseconds | undefined {
24
24
return ( this . constructor as TypeofTaskStorable ) . taskTtl
25
25
}
26
26
27
- get taskTtlDone ( ) : number | undefined {
27
+ get taskTtlDone ( ) : Milliseconds | undefined {
28
28
return ( this . constructor as TypeofTaskStorable ) . taskTtlDone
29
29
}
30
30
31
- getTaskTtl ( _context ?: Context ) : number | undefined {
31
+ getTaskTtl ( _context ?: Context ) : Milliseconds | undefined {
32
32
return ( this . constructor as TypeofTaskStorable ) . taskTtl
33
33
}
34
34
35
- getTaskTtlDone ( _context ?: Context ) : number | undefined {
35
+ getTaskTtlDone ( _context ?: Context ) : Milliseconds | undefined {
36
36
return ( this . constructor as TypeofTaskStorable ) . taskTtlDone
37
37
}
38
38
0 commit comments