Update functions moved to server.py and called from api's updateFeed.

sqlite can only be accessed by a single process.