File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
mapswipe_workers/mapswipe_workers/firebase_to_postgres Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,16 @@ def update_user_data(user_ids=None):
2020 ORDER BY created DESC
2121 LIMIT 1
2222 '''
23- last_updated = pg_db .retr_query (pg_query )
23+ last_updated = pg_db .retr_query (pg_query )[][]
24+ logger .info (f'got last updated timestamp: { last_updated } ' )
25+
2426 if last_updated is None :
2527 # No users in the Postgres database yet.
2628 # Get all users from Firebase.
2729 users = fb_ref .get ()
2830 print (users )
2931 else :
3032 # Get only new users from Firebase.
31- print (last_updated )
32- last_updated = last_updated [0 ][0 ]
33- print (last_updated )
3433 last_updated = last_updated .strftime ('%Y-%m-%dT%H:%M:%S.%fZ' )
3534 fb_query = fb_ref .order_by_child ('created' ).start_at (last_updated )
3635 users = fb_query .get ()
You can’t perform that action at this time.
0 commit comments