Tidy up thread logic and version check

This commit is contained in:
Leigh Morresi
2021-03-01 14:29:21 +01:00
parent 187523d8d6
commit e0578acca2
5 changed files with 58 additions and 23 deletions

View File

@@ -30,10 +30,11 @@ def app(request):
app_config = {'datastore_path': datastore_path}
datastore = store.ChangeDetectionStore(datastore_path=app_config['datastore_path'], include_default_watches=False)
app = changedetection_app(app_config, datastore)
app.config['STOP_THREADS'] = True
def teardown():
datastore.stop_thread = True
app.config['STOP_THREADS'] = True
app.config.exit.set()
try:
os.unlink("{}/url-watches.json".format(datastore_path))
except FileNotFoundError: