as described in https://serverfault.com/questions/407612/error-2006-mysql-server-has-gone-away
the uwsgi server usually forks its workers from the parent, which already has a connection
open to the mysql database. So the new child typically inherits the same connection.
Should both workers use the same connection at the same time, the server connection throws a
'2006, server has gone away error'.
The flag --lazy creates fresh forks for each child, each creating a new connection.
This prevents the overload and after testing, the '2006' error seems to not be reproduceable.
- the icalHandler in the backend is used in two instances. First, when
the user adds a new ical calendar into the database, routes.py passes
the information (name and url) to the ical Handler. The calendars are
saved in the database as type 'ical'.
Then, when a connected device pulls current events, all the calendars
which are of type 'ical' are pulled and parsed for current events.
See the backend commit for details on what happens there.
- All google Calendar related functions now have an additional check,
to make sure that the calendar they are working on is of type 'Google'.
- device now last field 'last connection' which gets updated
at every server connection from the respective device
- manual cleanup script in database deletes all devices which
have never been updated, or have a timestamp older than 30 days
- uses existing wsgi.py file
- adds wsgi.ini file
- sets socket
- defines application to be run, which it gets from wsgi.py file
- uses http communication to nginx server
- some random number of workers
- updates Dockerfile and docker-entrypoint
- landing page shows two images of google calendar and tizen watch
and how the calendars corelate
- routes redesigned to fit this landing page
- redesign of coloring in css
- backend now takes care of all the recoloring, and communication with database
- google handler takes care of the entire communication with google
- colors selected on the front-end are now translated to the watch
- Calendars in the database now directly save the color the user has set
- only if the event has a different color than the calendar (event color from google is not 0)
is the event color from google used.
- No more passing around of google color ids, hex colors all the way
- fingerprint generated first time device connects
- saved to database and served to device
- connection status set to true, once device requests first package
- user can link device via online form
- form added to push new device id to backend
- device added to db model (needs to be pushed still)
- form return right now just prints
- design for device list created, still needs some updates
- credentials still lost the refresh token after a certain event
- this was now fixed by completely removing any saves past the first one
- https://trello.com/c/iORYLYHl/44-1-check-on-credentials
- Color Coding is now updated
- fixed an incorrect color mapping in the colors.json
- updates some calls to functions to correctly get the natural colors
- the incorrect red -> yellow mapping might have to do with the previous credentials error