Spaces:
Sleeping
Sleeping
updated stream
Browse files
app.py
CHANGED
@@ -487,6 +487,7 @@ collection = db['Points']
|
|
487 |
|
488 |
# A function to handle changes
|
489 |
def handle_change(change):
|
|
|
490 |
# add everybodies points and add it to the leaderboard table
|
491 |
collections = db.list_collection_names()
|
492 |
if "LeaderBoard" not in collections:
|
@@ -503,6 +504,7 @@ def handle_change(change):
|
|
503 |
('lastName', 1),
|
504 |
('totalpoints', -1)
|
505 |
])
|
|
|
506 |
else:
|
507 |
if change['operationType'] == 'insert':
|
508 |
# Extract the full document
|
|
|
487 |
|
488 |
# A function to handle changes
|
489 |
def handle_change(change):
|
490 |
+
print("Change detected in point making changes immediately")
|
491 |
# add everybodies points and add it to the leaderboard table
|
492 |
collections = db.list_collection_names()
|
493 |
if "LeaderBoard" not in collections:
|
|
|
504 |
('lastName', 1),
|
505 |
('totalpoints', -1)
|
506 |
])
|
507 |
+
print("index",index)
|
508 |
else:
|
509 |
if change['operationType'] == 'insert':
|
510 |
# Extract the full document
|