()
| 113 | private run = false; |
| 114 | |
| 115 | async init() { |
| 116 | if (this.run) return this; |
| 117 | |
| 118 | const cache = this.getCache(); |
| 119 | if (await cache.hasValueAndIsNotEmpty()) { |
| 120 | this.logger.log('Cached'); |
| 121 | this.meta = await cache.getValue(); |
| 122 | this.run = true; |
| 123 | await this.fillOverviewState(); |
| 124 | return this; |
| 125 | } |
| 126 | |
| 127 | await this._init(); |
| 128 | this.run = true; |
| 129 | await cache.setValue(this.getMeta()); |
| 130 | await this.fillOverviewState(); |
| 131 | return this; |
| 132 | } |
| 133 | |
| 134 | protected async fillOverviewState() { |
| 135 | for (const relation in this.meta.related) { |
nothing calls this directly
no test coverage detected