Skip to content

Commit

Permalink
⚡️ Always return an empty server_to_phone response
Browse files Browse the repository at this point in the history
We don't actually use the server_to_phone response on the phone since we always
retrieve data from the server. This comments out the data that is returned from
the server so that we don't waste time reading data that we don't use.

We still get the calls as a coarse ping to know that the app is installed and is
working correctly, even if the user is not contributing data. But we don't burn
up bandwidth reading unused data from the server.

This cleanup is part of removing the NEW_DATA implicit intent
e-mission/e-mission-docs#1079 (comment)
  • Loading branch information
shankari committed Aug 28, 2024
1 parent dea6ff4 commit 9e6d7c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emission/net/api/cfc_webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ def getFromCache():
logging.debug("Called userCache.get")
user_uuid=getUUID(request)
logging.debug("user_uuid %s" % user_uuid)
to_phone = usercache.sync_server_to_phone(user_uuid)
# to_phone = usercache.sync_server_to_phone(user_uuid)
to_phone = []
return {'server_to_phone': to_phone}

@post('/usercache/put')
Expand Down

0 comments on commit 9e6d7c8

Please sign in to comment.