We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4265077 commit e0e16e2Copy full SHA for e0e16e2
examples/live_updates/main.py
@@ -49,7 +49,14 @@ def main():
49
print("Live updater started. Watching for changes in the 'data' directory.")
50
print("Try adding, modifying, or deleting files in the 'data' directory.")
51
print("Press Ctrl+C to stop.")
52
- updater.wait()
+ try:
53
+ while True:
54
+ updates = updater.next_status_updates()
55
+ if not updates.active_sources:
56
+ print("No more active sources. Stopping live updater...")
57
+ break
58
+ except KeyboardInterrupt:
59
+ print("Stopping live updater...")
60
61
62
if __name__ == "__main__":
0 commit comments