Function
waitOnResource
(
resource: string,
logger?: Pick<Console, "debug">,
)
Source from the content-addressed store, hash-verified
| 25 | }; |
| 26 | |
| 27 | export const waitOnResource = async ( |
| 28 | resource: string, |
| 29 | logger?: Pick<Console, "debug">, |
| 30 | ) => { |
| 31 | logger?.debug(`Waiting on ${resource}...`); |
| 32 | |
| 33 | await waitOn({ |
| 34 | resources: [resource], |
| 35 | timeout: 30000, |
| 36 | }); |
| 37 | |
| 38 | logger?.debug(`${resource} is ready`); |
| 39 | }; |
| 40 | |
| 41 | /** |
| 42 | * @todo reimplement a 'changes to entities' publisher |
Tested by
no test coverage detected