Commit f99d37c
committed
Wait for GeoIP databases to be ready before starting monitor
Replaces one-shot os.path.exists() check with a retry loop that attempts
to open the geoip2 Readers directly. If the files are missing or still
being written (e.g. geoipupdate container still downloading), the monitor
waits 5s and retries. A successful Reader open guarantees the file is
complete and valid, since geoip2 reads the MMDB header on open.1 parent 25fa735 commit f99d37c
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| |||
0 commit comments