Commit Graph

12 Commits

Author SHA1 Message Date
081888d1f6 uwsgi initialization uses the --lazy flag, to prevent connection overload
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.
2020-08-17 13:21:33 +02:00
752c7c5577 adds ical input to calendar html templates and implements data handling
- 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'.
2020-07-25 18:05:55 +02:00
2add28fa00 adds ical form and form visualization in calendar.html 2020-07-25 10:50:02 +02:00
15e68b88e8 adds uwsgi support instead of using flask dev server
- 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
2020-07-10 11:47:49 +02:00
adb20dea14 code cleanup and comments 2020-07-10 10:55:01 +02:00
87dedb8e02 adds device generation and connection
- 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
2020-05-28 15:43:51 +02:00
355ba99ca3 updates database design for mariadb 2020-05-27 20:06:43 +02:00
934c4f2a1d adds favicon, changes menu 2020-05-21 10:18:40 +02:00
ee54dd5daa updates color generation, tries fixing credentials bug
- 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
2020-05-17 22:59:12 +02:00
1b7980e834 adds routines.python script 2020-05-15 16:05:45 +02:00
ae773daad7 modifies entrypoint back to flask 2020-05-11 23:05:41 +02:00
dbb6d170da adds structure for virtual environment uwsgi and http communication
- starts uwsgi and flask in virtual environment instead of docker
- sets oauth2 https error to false (OAUTHLIB_INSECURE_TRANSPORT=1)

- this setup works, but
  - moving it into docker
  -  removing the venv
  -  and allowing https connection internally?
would be better
2020-05-10 20:31:42 +02:00