Skip to content

Commit f6341be

Browse files
committed
wip
1 parent 4bfcdb8 commit f6341be

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ jobs:
4949
- name: Run tests
5050
run: make test
5151

52+
- run: make test
53+
- run: make test
54+
- run: make test
55+
- run: make test
56+
- run: make test
57+
- run: make test
58+
- run: make test
59+
- run: make test
60+
5261
- name: Verify typehints
5362
run: make lint
5463

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ install:
2828
.PHONY: test
2929
test: #! Run unit tests
3030
test: install
31-
@poetry run pytest $(PYTEST_FLAGS)
31+
@poetry run pytest $(PYTEST_FLAGS) ldclient/testing/test_file_data_source.py::test_reloads_modified_file_in_polling_mode
3232

3333
.PHONY: lint
3434
lint: #! Run type analysis and linting checks

ldclient/impl/integrations/files/file_data_source.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
import os
33
import traceback
44
import time
5+
from logging import getLogger
56
from typing import Optional
67

8+
logger = getLogger('@@@@@')
9+
710
have_yaml = False
811
try:
912
import yaml
@@ -191,17 +194,21 @@ def __init__(self, resolved_paths, reloader, interval):
191194
self._file_times = self._check_file_times()
192195
self._timer = RepeatingTask(interval, interval, self._poll)
193196
self._timer.start()
197+
logger.warning('Using the polling file watcher because the watchdog package is not installed')
194198

195199
def stop(self):
196200
self._timer.stop()
197201

198202
def _poll(self):
203+
logger.warning('Polling for changes to data files')
199204
new_times = self._check_file_times()
200205
changed = False
201206
for file_path, file_time in self._file_times.items():
202207
if new_times.get(file_path) is not None and new_times.get(file_path) != file_time:
208+
logger.warning('CHANGES detected in %s' % file_path)
203209
changed = True
204210
break
211+
logger.warning('No changes detected in %s' % file_path)
205212
self._file_times = new_times
206213
if changed:
207214
self._reloader()

0 commit comments

Comments
 (0)