is there a way to set times using milliseconds, other than by setting them using a disc id?
2010-07-13 19457, 2010
ruaok
not in the current code
2010-07-13 19417, 2010
nikki
ah :/
2010-07-13 19420, 2010
pronik` joined the channel
2010-07-13 19429, 2010
navap
Is anything put into the stash from the Root controller accessible from any other controller?
2010-07-13 19456, 2010
navap
The following IF isn't working as I'd expect it to: if ($c->stash->{server_details}->{is_slave_db})
2010-07-13 19423, 2010
navap wonders if ruaok is around
2010-07-13 19457, 2010
navap
Dumper($c->stash->{server_details}->{is_slave_db}) comes up as undef, even though I can access the value of server_details.is_slave_db in the template
2010-07-13 19428, 2010
warp
navap: those are set in 'sub end' in Server/Controller/Root
2010-07-13 19439, 2010
nikki
moin warp
2010-07-13 19452, 2010
warp
time-of-day!
2010-07-13 19423, 2010
navap
warp: Yeah but I'm having trouble pulling their values out of the stash in another controller.
2010-07-13 19446, 2010
navap
I know they're in the stash, they're just hiding from me.
2010-07-13 19404, 2010
warp
navap: yeah, obviosly. 'end' implies it is run at the end, so they only get send _after_ the other controllers are done.
2010-07-13 19434, 2010
warp
navap: if you need them in the controller, I'd say just move that code from 'end' to 'begin' in Root.pm
2010-07-13 19438, 2010
navap
Ahh, that also answers a question I was about to ask you :p
2010-07-13 19449, 2010
warp
s/send/set/
2010-07-13 19441, 2010
navap
Which syntax do you prefer? DBDefs::DB_STAGING_SERVER() or &DBDefs::DB_STAGING_SERVER?
2010-07-13 19401, 2010
warp
I usually leave the () off if they're not needed.
2010-07-13 19412, 2010
navap
Will DBDefs::DB_STAGING_SERVER on its own work then?
2010-07-13 19424, 2010
warp
yes
2010-07-13 19429, 2010
nikki
does it?
2010-07-13 19451, 2010
nikki
I thought you had to have the & or the brackets
2010-07-13 19401, 2010
warp
oh, hm. well, try it :)
2010-07-13 19436, 2010
navap
Is there any reason why something would be put into the stash both in begin and in end?
2010-07-13 19452, 2010
warp
navap: no.
2010-07-13 19457, 2010
navap
Okay
2010-07-13 19404, 2010
warp
navap: I think the idea was that you only need server_details and such if you're rendering a full page, and the controller may set c->action->attributes->{Minimal} in some way, which means server_details isn't needed.
2010-07-13 19448, 2010
navap
Judging by the UK mirror, a mirror server should not user profile data?
2010-07-13 19453, 2010
navap
should not have*
2010-07-13 19407, 2010
warp
I'm not sure, I don't think we're actively pursuing mirror servers anymore.
2010-07-13 19438, 2010
navap
Well by mirror server I mean anything that's getting replication packets.
2010-07-13 19414, 2010
navap
Is there any purpose in having profiles accessible on a mirror?
2010-07-13 19451, 2010
navap
Unless they're also in the replication packets they'd become out of date quite quickly (stats wise).
2010-07-13 19454, 2010
warp
I can't think of anything :)
2010-07-13 19450, 2010
ruaok returns to around
2010-07-13 19447, 2010
ruaok
navap: there isn't a point, since the tables will be empty. since we do no export anything that is confidential
2010-07-13 19408, 2010
navap
The confidential data will be removed, sure, but the rest of the user data is still importable from the dumps.
2010-07-13 19423, 2010
navap
I was asking because I was wondering whether or not to remove user access as a part of the mirror server checks.
2010-07-13 19423, 2010
navap
I was planning on removing access to the log in/registration pages, as well as trying to view any of the user pages.
2010-07-13 19409, 2010
ruaok
hm. right.
2010-07-13 19408, 2010
ruaok
thing is the user could view the pages, but there will be no user links at add since there will be no edits.
2010-07-13 19430, 2010
ruaok
I personally would not make any extra effort at all in this case.
2010-07-13 19431, 2010
navap
warp: It looks like data that's put into the stash in begin is not accessible from the templates, it needs to be added into both begin and end to be accessible from both controllers and templates.
If I go to /account/edit I get forwarded to /user/do_login. I've added a detach at the start of do_login, but it's not taking affect because after the detach it's going back to /account/edit and then returning a 500 server error.
2010-07-13 19408, 2010
navap
I thought detach would break out of the forward?
2010-07-13 19437, 2010
ijabz joined the channel
2010-07-13 19443, 2010
ijabz joined the channel
2010-07-13 19445, 2010
ijabz joined the channel
2010-07-13 19429, 2010
pronik` joined the channel
2010-07-13 19415, 2010
zazi joined the channel
2010-07-13 19440, 2010
djce joined the channel
2010-07-13 19409, 2010
nikki
now that each part of a date is stored separated, how can I recombine them to select dates using things like now() and stuff?
2010-07-13 19417, 2010
luks
it's probably faster to query them separately
2010-07-13 19429, 2010
luks
because as soon as you combine them, you can't use indexes
2010-07-13 19417, 2010
nikki
but how would that work with things like selecting anything between one date and another date?
2010-07-13 19412, 2010
luks
you have to do something like "year BETWEEN date_part('year', date1) AND date_part('year', date2) AND month BETWEEN date_part('month', date1) AND date_part('month', date2) .." :(
2010-07-13 19420, 2010
luks
now that we already depend on two non-standard psql extension, we might as well just write a type for these partial dates
2010-07-13 19448, 2010
ijabz joined the channel
2010-07-13 19455, 2010
pronik` joined the channel
2010-07-13 19408, 2010
hawke_ joined the channel
2010-07-13 19457, 2010
ruaok joined the channel
2010-07-13 19404, 2010
jdamcd joined the channel
2010-07-13 19436, 2010
zazi joined the channel
2010-07-13 19403, 2010
navap wonders what to work on now
2010-07-13 19401, 2010
ruaok
time to set aside MB and work on world domination?
2010-07-13 19443, 2010
navap
muhahaha
2010-07-13 19417, 2010
ruaok
aight. the second proc for asterix was just delivered.
2010-07-13 19421, 2010
ruaok
time to get that in motion.
2010-07-13 19401, 2010
ruaok joined the channel
2010-07-13 19437, 2010
ruaok runs off to go to the colo to rack asterix
2010-07-13 19451, 2010
ijabz joined the channel
2010-07-13 19411, 2010
ijabz joined the channel
2010-07-13 19431, 2010
ruaok joined the channel
2010-07-13 19447, 2010
ruaok
Djce: ping?
2010-07-13 19406, 2010
ruaok
Alas, no.
2010-07-13 19414, 2010
navap
What's the difference between $self->c->log and $c->log ?
2010-07-13 19427, 2010
navap
The latter works but the former returns "Can't locate object method "log" via package "MusicBrainz::Server::Context"
2010-07-13 19436, 2010
navap
See, everyone runs from my questions :p
2010-07-13 19436, 2010
luks
$self->c seems to be a MusicBrainz::Server::Context instance, while $c is probably a MusicBrainz::Server instance (which extends Catalyst)
2010-07-13 19406, 2010
luks
the context stuff seems different than what I remember
2010-07-13 19415, 2010
luks
so I'm not sure how it creates the context object
2010-07-13 19403, 2010
luks
hm, what is $self?
2010-07-13 19436, 2010
navap
I'm looking at MusicBrainz::Server::Data::WikiDocIndex
2010-07-13 19416, 2010
luks
seems like a leftover
2010-07-13 19422, 2010
luks
I assume the code there doesn't work, right?
2010-07-13 19403, 2010
navap
It does, as far as I know it's just the log->errors that don't work.
2010-07-13 19447, 2010
luks
yeah, I mean if the index file doesn't exist, it crashes
2010-07-13 19455, 2010
navap
Yeah
2010-07-13 19439, 2010
luks
I'd just replace the call with warn and ignore it
2010-07-13 19429, 2010
luks
you could fix it by changing MB::S::Model::MB to store the actual Catalyst context in MB::S::Context and then forward calls from MB::S::Context->log to the Catalyst context
2010-07-13 19449, 2010
luks
but that's probably too much work for almost no benefit
2010-07-13 19421, 2010
navap
Yeah.. I'll just use warn
2010-07-13 19423, 2010
navap
$content holds $response->content of an LWP::UserAgent, do you have any recomendations on how to extract only a certain div out of $content?
2010-07-13 19458, 2010
navap
The div has an id set.
2010-07-13 19422, 2010
luks
is it a valid XML?
2010-07-13 19445, 2010
navap
I think so.
2010-07-13 19408, 2010
navap
It's a valid HTML document, would that make it a valid XML document?
2010-07-13 19417, 2010
luks
hm
2010-07-13 19434, 2010
luks
Data::WikiDoc actually already uses some HTML parser
2010-07-13 19416, 2010
luks
where is this code you want to change?
2010-07-13 19440, 2010
navap
I'm writing new code, but it's based off of the code in MusicBrainz::Server::Data::WikiDoc
2010-07-13 19411, 2010
navap
I'm trying to get searching working from /doc/
2010-07-13 19434, 2010
luks
one sec, let me read HTML::TreeBuilder::XPath's docs