#musicbrainz-devel

/

      • nikki joined the channel
      • ruaok joined the channel
      • nikki
        is there a way to set times using milliseconds, other than by setting them using a disc id?
      • ruaok
        not in the current code
      • nikki
        ah :/
      • pronik` joined the channel
      • navap
        Is anything put into the stash from the Root controller accessible from any other controller?
      • The following IF isn't working as I'd expect it to: if ($c->stash->{server_details}->{is_slave_db})
      • navap wonders if ruaok is around
      • 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
      • warp
        navap: those are set in 'sub end' in Server/Controller/Root
      • nikki
        moin warp
      • warp
        time-of-day!
      • navap
        warp: Yeah but I'm having trouble pulling their values out of the stash in another controller.
      • I know they're in the stash, they're just hiding from me.
      • warp
        navap: yeah, obviosly. 'end' implies it is run at the end, so they only get send _after_ the other controllers are done.
      • navap: if you need them in the controller, I'd say just move that code from 'end' to 'begin' in Root.pm
      • navap
        Ahh, that also answers a question I was about to ask you :p
      • warp
        s/send/set/
      • navap
        Which syntax do you prefer? DBDefs::DB_STAGING_SERVER() or &DBDefs::DB_STAGING_SERVER?
      • warp
        I usually leave the () off if they're not needed.
      • navap
        Will DBDefs::DB_STAGING_SERVER on its own work then?
      • warp
        yes
      • nikki
        does it?
      • I thought you had to have the & or the brackets
      • warp
        oh, hm. well, try it :)
      • navap
        Is there any reason why something would be put into the stash both in begin and in end?
      • warp
        navap: no.
      • navap
        Okay
      • 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.
      • navap
        Judging by the UK mirror, a mirror server should not user profile data?
      • should not have*
      • warp
        I'm not sure, I don't think we're actively pursuing mirror servers anymore.
      • navap
        Well by mirror server I mean anything that's getting replication packets.
      • Is there any purpose in having profiles accessible on a mirror?
      • Unless they're also in the replication packets they'd become out of date quite quickly (stats wise).
      • warp
        I can't think of anything :)
      • ruaok returns to around
      • ruaok
        navap: there isn't a point, since the tables will be empty. since we do no export anything that is confidential
      • navap
        The confidential data will be removed, sure, but the rest of the user data is still importable from the dumps.
      • I was asking because I was wondering whether or not to remove user access as a part of the mirror server checks.
      • I was planning on removing access to the log in/registration pages, as well as trying to view any of the user pages.
      • ruaok
        hm. right.
      • thing is the user could view the pages, but there will be no user links at add since there will be no edits.
      • I personally would not make any extra effort at all in this case.
      • 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.
      • dinog joined the channel
      • ruaok
        navap: have you chosen a server name yet?
      • navap
        No
      • ruaok
        want?
      • navap
        Sure!
      • ruaok
        ok, go!
      • cartoon characters.
      • navap
        I'm torn between Tintin and Asterix
      • ruaok
        OOOHHHH!
      • navap
        :)
      • ruaok
        both good choices.
      • but, I would prefer tintin
      • easier to type.
      • navap
        Tintin it is
      • ruaok
        thought asterix is cooler, IMHO.
      • asterix
      • navap
        heh I can imagine a lot of typos with asterix :p
      • ruaok
        asterix
      • feh. asterix is cooler.
      • navap
        Sure, as I said I'm torn betwene them.
      • ruaok
        i can deal.
      • lets go with asterix.
      • navap
        I'm fine with either.
      • Okay :)
      • ruaok
        ;-D
      • navap
        And for nikki's record keeping: http://en.wikipedia.org/wiki/Asterix_(character)
      • ruaok
        already edited that.
      • navap
        cool
      • heh I'm first on the list :p
      • ruaok
        oh, I need to reference the chatlog too.
      • damn. MB is meticulous. :)
      • navap
        ;)
      • ruaok adds gir to the list
      • ruaok
        and I suppose odie ought to be there too.
      • ijabz joined the channel
      • navap
        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.
      • I thought detach would break out of the forward?
      • ijabz joined the channel
      • ijabz joined the channel
      • ijabz joined the channel
      • pronik` joined the channel
      • zazi joined the channel
      • djce joined the channel
      • 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?
      • luks
        it's probably faster to query them separately
      • because as soon as you combine them, you can't use indexes
      • nikki
        but how would that work with things like selecting anything between one date and another date?
      • 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) .." :(
      • now that we already depend on two non-standard psql extension, we might as well just write a type for these partial dates
      • ijabz joined the channel
      • pronik` joined the channel
      • hawke_ joined the channel
      • ruaok joined the channel
      • jdamcd joined the channel
      • zazi joined the channel
      • navap wonders what to work on now
      • ruaok
        time to set aside MB and work on world domination?
      • navap
        muhahaha
      • ruaok
        aight. the second proc for asterix was just delivered.
      • time to get that in motion.
      • ruaok joined the channel
      • ruaok runs off to go to the colo to rack asterix
      • ijabz joined the channel
      • ijabz joined the channel
      • ruaok joined the channel
      • Djce: ping?
      • Alas, no.
      • navap
        What's the difference between $self->c->log and $c->log ?
      • The latter works but the former returns "Can't locate object method "log" via package "MusicBrainz::Server::Context"
      • See, everyone runs from my questions :p
      • luks
        $self->c seems to be a MusicBrainz::Server::Context instance, while $c is probably a MusicBrainz::Server instance (which extends Catalyst)
      • the context stuff seems different than what I remember
      • so I'm not sure how it creates the context object
      • hm, what is $self?
      • navap
        I'm looking at MusicBrainz::Server::Data::WikiDocIndex
      • luks
        seems like a leftover
      • I assume the code there doesn't work, right?
      • navap
        It does, as far as I know it's just the log->errors that don't work.
      • luks
        yeah, I mean if the index file doesn't exist, it crashes
      • navap
        Yeah
      • luks
        I'd just replace the call with warn and ignore it
      • 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
      • but that's probably too much work for almost no benefit
      • navap
        Yeah.. I'll just use warn
      • $content holds $response->content of an LWP::UserAgent, do you have any recomendations on how to extract only a certain div out of $content?
      • The div has an id set.
      • luks
        is it a valid XML?
      • navap
        I think so.
      • It's a valid HTML document, would that make it a valid XML document?
      • luks
        hm
      • Data::WikiDoc actually already uses some HTML parser
      • where is this code you want to change?
      • navap
        I'm writing new code, but it's based off of the code in MusicBrainz::Server::Data::WikiDoc
      • I'm trying to get searching working from /doc/
      • luks
        one sec, let me read HTML::TreeBuilder::XPath's docs
      • navap
        Thanks
      • luks
      • something like this should work
      • navap
        Thanks! That helps a lot.
      • ijabz joined the channel
      • ruaok_gone
        /nick ruaok
      • ruaok
        heh
      • ijabz joined the channel