all i need now is db and figure out how to properly run both server and client in background :)
2014-05-01 12135, 2014
ianmcorvidae
I think we just ran them in screen before
2014-05-01 12142, 2014
ianmcorvidae
oh
2014-05-01 12146, 2014
ianmcorvidae
there's a thing to make sure they keep running
2014-05-01 12150, 2014
ianmcorvidae
lemme grab the one used by reports.mbsandbox
2014-05-01 12123, 2014
Gentlecat
i'm not a linux guru yet heh
2014-05-01 12144, 2014
ianmcorvidae
for that I just use: while true; do ./venv/reports/bin/python reports.fcgi & sleep 1200; ps aux | grep reports.fcgi | grep -v grep | awk '{print $2}' | xargs kill; done
2014-05-01 12100, 2014
ianmcorvidae
which is 100% hack, in a real system we'd deploy either of these with uwsgi
2014-05-01 12104, 2014
ianmcorvidae
but it works for this :)
2014-05-01 12135, 2014
ianmcorvidae
obviously change the location of the virtualenv python binary and the name of the .fcgi file
2014-05-01 12139, 2014
ianmcorvidae
(in both places)
2014-05-01 12149, 2014
Gentlecat
right
2014-05-01 12128, 2014
ianmcorvidae
grepping for something including your username is also a good idea since of course mjjc's is still running
2014-05-01 12107, 2014
ianmcorvidae
his seems to be in tmux rather than screen, but same idea :)
you won't want that, since both things will include 'gentlecat'
2014-05-01 12111, 2014
ianmcorvidae
so the client one will kill the server and vice versa
2014-05-01 12110, 2014
ianmcorvidae
I'd have do /home/gentlecat/...venv/bin/python (i.e., use the full path), and then replace 'grep gentlecat' with 'grep client.fcgi | grep gentlecat'
2014-05-01 12115, 2014
ianmcorvidae
(or server.fcgi, for that one, obviously)
2014-05-01 12140, 2014
ianmcorvidae
probably could be done with one grep but it doesn't really matter, so :)
2014-05-01 12150, 2014
Gentlecat
updated pastebin
2014-05-01 12120, 2014
Gentlecat
oh, also full path
2014-05-01 12124, 2014
ianmcorvidae
yeah
2014-05-01 12130, 2014
ianmcorvidae
the DB is created, incidentally
2014-05-01 12144, 2014
ianmcorvidae
seems to still be 500ing, not sure why
2014-05-01 12106, 2014
ianmcorvidae
oh, I guess I haven't actually done the table-making and such, though you can probably do that
2014-05-01 12118, 2014
ianmcorvidae
I've done what python manage.py create_db would do, anyway, if somewhat more manually
2014-05-01 12132, 2014
Gentlecat
okay
2014-05-01 12122, 2014
ianmcorvidae
the pastebin looks right at this point as well
2014-05-01 12159, 2014
ianmcorvidae
if you don't know screen: 'screen' creates a new one, then you can run one of them, then "ctrl-a c" will create a second window in which to run the other, ctrl-a n/p to move to next/previous window and ctrl-a d to detach; screen -ls will list current screens and screen -rd will reconnect if there's only one; if there's more than one you'll have to specify a process number or such, which you can get from screen -ls
2014-05-01 12122, 2014
Gentlecat
that's some cool magic, looks like i've got both server and client running
2014-05-01 12142, 2014
Gentlecat
still getting 500 though
2014-05-01 12153, 2014
ianmcorvidae
yup, getting errors rather than 502s on both
2014-05-01 12112, 2014
ianmcorvidae
I assume tables/fixtures still need inserting, anyway, but as mentioned I think you can do that without me, so
huh. project gutenberg URLs auto-detect as "lyrics". I was wondering how that would work. i.e. wondering if one could use "misc" or something for audiobooks.
2014-05-01 12110, 2014
CallerNo6
well, okay, "misc" is deprecated , bad example
2014-05-01 12155, 2014
ianmcorvidae
Gentlecat: I hadn't changed anything, but good it's working I guess!
2014-05-01 12125, 2014
Gentlecat
I switched to branch with cover art, should look a bit better now
2014-05-01 12144, 2014
ianmcorvidae
cool
2014-05-01 12100, 2014
ianmcorvidae
I see a review on the front page that doesn't seem to exist? I guess the 'Random user' user is fake anyway though
2014-05-01 12124, 2014
ianmcorvidae
oh, or it just went away and it was my local HTTP cache, heh
2014-05-01 12105, 2014
Gentlecat
yeah, I just removed one
2014-05-01 12133, 2014
Gentlecat
I guess we need more ways to access review creation and editing stuff
2014-05-01 12115, 2014
ianmcorvidae
yeah, a prominent 'create review' button or such would be nice (when you aren't over your limits, at least, though probably just disabling it in that case makes sense)
2014-05-01 12116, 2014
Gentlecat
it's a bit annoying that I need to open /profile/review/ just to edit reviews or add a new one
2014-05-01 12120, 2014
ianmcorvidae
yeah
2014-05-01 12154, 2014
ianmcorvidae
the onerror for the images isn't getting fired for me in some cases
2014-05-01 12113, 2014
Gentlecat
yep, I noticed that too
2014-05-01 12128, 2014
ianmcorvidae
which may be because you need to do what musicbrainz-server does and not add the src until the onerror is there (i.e., add an empty <img> and then add the src with javascript)
2014-05-01 12138, 2014
Gentlecat
mostly when tab is in background
2014-05-01 12110, 2014
Gentlecat
can you link me an example?
2014-05-01 12107, 2014
ianmcorvidae
of what MBS does? the issue is of course transient, it depends on how caches interact mostly
if that's still the onerror callback that won't help, because the issue is the onerror callback not firing
2014-05-01 12104, 2014
Gentlecat
right, I need to call that for every image
2014-05-01 12115, 2014
ianmcorvidae
yeah, but if you already have a src set, that's the issue
2014-05-01 12147, 2014
ianmcorvidae
you need to set the error callback before setting the src at all; it looks like what you're doing there is setting the src to the same thing after setting the error callback
2014-05-01 12114, 2014
ianmcorvidae
which won't work because the browser won't rerequest the image if it already knows it's missing, and thus won't fire the error callback
2014-05-01 12102, 2014
Gentlecat
I updated last pastebin
2014-05-01 12134, 2014
ianmcorvidae
yeah, that looks right
2014-05-01 12139, 2014
Gentlecat
but that seems kind of hacky
2014-05-01 12100, 2014
ianmcorvidae
it definitely is hacky, yeah :/ not much to do about it
2014-05-01 12103, 2014
Gentlecat
I guess we'll have to wait for API fixes
2014-05-01 12118, 2014
ianmcorvidae
there's other methods of trying to see if an image loaded correctly (img.complete and image.naturalWidth seem to pop up fairly often, but neither is supported everywhere), none that are events quite the way you'd probably want
2014-05-01 12145, 2014
ianmcorvidae
img error events don't bubble, as I recall, which prevents the potentially-nice option of putting it on <body> or something
2014-05-01 12152, 2014
ianmcorvidae
another option would be something server-side, I guess, that tries to load the image, and if it works return a redirect to it, otherwise a redirect to the not-found image?
2014-05-01 12134, 2014
ianmcorvidae
arguably that'd be a good thing to add to caa.org, even, just an extra parameter for something to 307 to in case of a 404, rather than just 404ing
2014-05-01 12152, 2014
Gentlecat
but wouldn't server side checking increase page load time?