« first day (266 days earlier)      last day (368 days later) » 

00:49
I'll try to work on notifications
01:33
@Mego do we get any headers when nginx rate limits?
 
2 hours later…
03:36
@Mego for websockets should we use websockets (w/ asyncio) or gevent-websockets (w/ greenlet)
03:50
gevent-websockets will play nicer with Gunicorn, but I'm pretty sure there's a Flask extension for this sort of thing
@quartata there's flask-sockets which is built on top of gevent-websockets
wait do I need to spawn the gunicorn workers separately like celery O_o
heck it going with socketio
unfortunately that's +50KB for the client but we can load it async
 
2 hours later…
06:09
Question: what is gunicorn and is it like werkzeug
because from what I can tell flask runs basically one thread and right now we're using that for everything but it seems (particularly as we add websockets/notifications) that we'd probably want to run things across multiple processes
we have celery for heavy lifting but also for the flask part i am thinking we'd probably want to be doing multiple flask processes?
 
1 hour later…
07:18
posted on July 29, 2018 by vihanb

Not ready for merging This adds: [x] Notification DB models [x] SocketIO [ ] Streaming notifications [ ] Streaming new posts [ ] Streaming new answers [ ] Streaming new comments [ ] Streaming new votes [x] Notification dispatch for: [x] New answer [ ] New comments [ ] Votes [ ] Outgolfs [ ] Notification grouping [x] Push notifications with Safari [ ] Push notifications with service worke

not 100% sure on best way to do sockets. I'm thinking to put PN code in a celery task
I'd like to avoid using SocketIO due to unnecessary overhead but not sure what using gevent-websockets implies
gtg for today thoguh
Also regarding pings: who should be pingable (follows? other users in thread? authors?) & where do we want to allow pings (posts? commentary? comments?)
 
8 hours later…
Anonymous
15:11
@Downgoat I don't think so
Anonymous
We use uwsgi, not gunicorn
Anonymous
And it's set up to spawn multiple flask processes (should be 4 currently). It uses multiprocessing to avoid the GIL
Anonymous
22:25
If we use Flask-SocketIO, we can take advantage of the fact that uWSGI already has the base functionality
Anonymous
I'm going to shut down the server temporarily to do the mysql upgrade (didn't get to it last night like I wanted)
Anonymous
22:39
Upgrade complete. We're now running on MySQL 8.0
Anonymous
@Downgoat User settings page styles look off: i.imgur.com/9Abr35y.png
m2crypto is driving me crazy apparently writing documentation is overrated Q_Q
Anonymous
Chrome Version 68.0.3440.75 (Official Build) (64-bit) on Win10
@Mego yeah, rather than spend too much time trying to fix it I'll just redo it when I convert the logic for the profile page to JS
Anonymous
Ok
Anonymous
22:44
DB upgrade is done and everything is functioning, so now I get to use neat stuff like CTEs for comment trees :D
btw is doing this a bad idea: load_pkcs12(open(certificate_path, 'rb').read(), passphrase) or should I move the open into a with
@Mego sounds cool :D if only i knew what CTE was.. :P
Anonymous
Always do opens in with blocks
Anonymous
@Downgoat Instead of loading recursive data with a bunch of queries, you can use a Common Table Expression (CTE) to load it all in one fell swoop
Anonymous
22:46
oh cool
Anonymous
23:23
Merging #205 - gonna be nervous during the entire deploy because this is the first time we'll be doing DB schema changes automatically with alembic during deploy
looks like alembic worked :D
Anonymous
Whew I can breathe again
h*ck internal server error
Anonymous
I had no idea if Alembic was gonna play nice with 8.0
I'm guessing this is config issue brb fixing
Anonymous
23:29
Yep, I haven't added the new config stuff yet
actually nvm different issue than I thought:
Duplicate entry '259' for key 'PRIMARY' [SQL: 'INSERT INTO logins (time, ip_address, user_id) VALUES (%(time)s, %(ip_address)s, %(user_id)s)'] [parameters: {'time': datetime.datetime(2018, 7, 29, 22, 39, 14, 496915), 'ip_address': '...', 'user_id': ...}]
Anonymous
That's an old error caused by me messing up the upgrade slightly
Anonymous
In my refactor branch, I've split config into config and auth, so we can avoid these issues by having an actual config file committed without also committing auth keys

« first day (266 days earlier)      last day (368 days later) »