The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-09-20

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 Grinnz actually it's very common for companies to maintain both an open source project and their commercial offering built on top of it, with two different names for marketability. microsoft kind of screwed this up, because their open source project is called vscode and their commercial product is called visual studio code, but they still treat them as two distinct licensed projects
00:05 Grinnz https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005
00:07 jberger right, but I'm saying that the internal name (and thus the open sourced name) comes first
00:07 jberger they didn't change the name from Tower to AWX, they branded AWX as Tower when they first sold it
00:51 PopeFelix joined #mojo
02:01 noganex joined #mojo
03:00 noganex_ joined #mojo
03:10 bwf joined #mojo
03:37 bwf joined #mojo
03:45 bwf joined #mojo
04:00 aborazmeh joined #mojo
04:04 dboehmer joined #mojo
04:13 inokenty-w joined #mojo
04:51 bwf joined #mojo
05:38 eseyman joined #mojo
05:58 bianca joined #mojo
05:59 dod joined #mojo
06:42 Vandal joined #mojo
06:49 AndrewIsh joined #mojo
06:59 petru joined #mojo
07:26 trone joined #mojo
07:50 cosimo joined #mojo
07:57 cosimo joined #mojo
08:20 sri mattp_: nope, that would be a different department though
08:21 sri and yes, i'm still at suse
08:38 petru joined #mojo
09:01 bianca joined #mojo
09:01 rshadow joined #mojo
09:25 mike_scope joined #mojo
09:27 mike_scope I've a project running in hypnotoad. At startup I've created a connection to an LDAP server. Is it possible to share this connection with the preforked instances rather than at the moment where I have three connections to LDAP
09:35 marcm joined #mojo
09:35 karjala_ joined #mojo
09:36 aborazmeh joined #mojo
11:02 marcm joined #mojo
11:04 bianca joined #mojo
11:21 marcm joined #mojo
12:52 tcohen joined #mojo
13:08 ladnaV joined #mojo
13:21 mtths joined #mojo
14:20 petru joined #mojo
14:56 tcohen joined #mojo
15:01 gizmomathboy joined #mojo
15:06 dod joined #mojo
15:06 ChmEarl joined #mojo
15:26 CandyAngel With regard to the "running X requests at the same time" with UserAgent and IOLoop->delay.. can I also use the ->delay to populate the URL list?
15:27 CandyAngel I have to do a lot of processing to get each url, which could have my GET requests going while I'm doing that
15:35 bianca joined #mojo
15:39 sh14 joined #mojo
15:42 sri has nothing to do with the delay, you'd have to use a subprocess to not block the event loop
15:53 disputin joined #mojo
16:42 stryx` joined #mojo
16:53 mrEriksson Hey folks, quick question, I'm looking for a way to do some cleanup work (locks etc) when a minion worker is started. Would prefer if it ran only in the top process before workers are spawned. Suggestions on where to put this?
16:54 mrEriksson I was thinking just after I register the minion plugin, but haven't figure out if workers are spawned when plugin is registered or later on.
17:10 itaipu joined #mojo
17:19 jberger mrEriksson: workers are spawned when you run the minion worker command
17:20 jberger I'm not sure there is a hook for what you are asking about
17:20 jberger but it seems to me you could just run your command before running minion worker, no?
17:21 jberger a bash script that is basically `perl pre_worker.pl; ./myapp minion worker;`
17:40 trone joined #mojo
17:47 sri http://mojolicious.org/perldoc/Minion#worker
17:47 mrEriksson jberger: Thanks. I ended up doing something similar. I create a Minion object and do the cleanup via that one, before loading the plugin, so that seems to work just fine
17:48 sri but that reminds me that i still want a solution for clearing locks when a minion job dies
17:49 mrEriksson sri: That would be emitted everytime a worker is spawned, which is not what I want, since that could create race conditions
17:49 sri why do you have more than one worker?
17:49 mrEriksson Yes, cleaning locks when minion dies would be awesome
17:51 mrEriksson sri: If I do minion worker -j 4, I would have four of them?
17:51 sri no
17:51 sri one worker running multiple jobs in forked processes
17:51 mrEriksson What do I have four of then?
17:51 sri four job processes
17:51 preaction forked children
17:52 mrEriksson Ah, so it forks for each new job?
17:52 sri yes
17:53 mrEriksson Thought it spawned multiple long-lived processes and if I had used the worker event, I would have had the code executed once for each worker spawned
17:53 mrEriksson But this is great
17:53 mrEriksson Solves my current problem, but also might make some other things easier to implement
17:53 mrEriksson Thanks guys! I appreciate it!
17:54 sri long lived processes suck since they use tons of memory, and fork is already dirt cheap
17:55 tchaves joined #mojo
17:57 mrEriksson So, dequeue event is emitted in my parent process when a child has been forked and started its job?
17:58 mrEriksson Does this also mean that after a job has been started, no new job would be initiated by that worker until I'm done with whatever I tied to the dequeue event?
18:17 jamesaxl joined #mojo
18:21 jberger to subscribe all the way down to the job events you have to kinda chain down into them
18:21 jberger like I do here: https://metacpan.org/source/JBERGER/Minion-Notifier-0.06/lib/Minion/Notifier.pm#L39
18:24 tooconfident joined #mojo
19:13 D joined #mojo
19:19 D How do you funnel the json from an ajax post/get into $self->req->json?  tried, 'contentType: "application/json; charset=utf-8"', but the parameters are stuck in $self->param()
19:20 preaction that looks like jquery
19:22 preaction when i do { contentType: 'application/json', data: JSON.stringify( object ) }, i get the right thing in mojolicious
19:22 D yes, I'm trying to pass json via jquery
19:22 D I'll try again!
19:23 bianca joined #mojo
19:23 preaction D: are you sure it's valid json?
19:23 D I will check
19:32 Grinnz had to read that a few times before i realized preaction wasn't making a frowny face
19:45 D I think it is weirdness via DataTables ... same works fine from jquery ajax call outside.  I am looking into guides for best practice for a controller sub to handle either type
20:26 tchaves joined #mojo
20:42 sri hmm, i guess we should have a version of $minion->lock that returns a scope guard
20:45 sri $minion->lock(foo, 3600, {scope => 1}) seems kinda silly
20:45 sri or rather
20:45 sri my $guard = $minion->lock(foo, 3600, {guard => 1})
20:46 sri hmm
20:46 sri my $guard = $minion->guard('foo', 3600);
20:48 sri kinda want to do that
20:48 sri would simplify some code at work
20:52 preaction Log::Any has: $log->adapter( ..., { scope => \my $scope } ); which might be an option. never saw it done that way before
20:53 sri eww
20:54 preaction eh, i like it for adding scoping to some api that's never had it before
20:54 sri think i'll go with adding a ->guard method
20:54 sri it kinda works for the use case
20:55 sri also easy to document
20:56 sri but first i have to watch the episode of the orville
21:12 itaipu joined #mojo
21:20 jberger everyone I have an important announcement! :-P
21:20 jberger I think we won the hashtag war!
21:21 jberger her last use of #mojolicious was July 16, now she seems to be using a few but primarily #mojomindset
21:21 jberger wooooo!
21:22 jberger http://s2.quickmeme.com/img/d4/d4b3fa3671cc6681977a980e68da6ced283e1e92c34e7f7b68b9baf39814ec56.jpg
21:29 CandyAngel Errr.. what?
21:31 zivester joined #mojo
21:51 jberger if you haven't stumbled on it before ... we had a certain humorous hashtag contention
21:52 jberger it wasn't really a war in any real sense
21:52 jberger scroll through https://twitter.com/search?src=typd&q=%23mojolicious and while you do hum sesame street's "one of these things is not like the other"
21:52 jberger :-D
21:54 disputin joined #mojo
21:59 arcanez "Verizon Support follows"
23:11 disputin joined #mojo
23:14 schelcj joined #mojo
23:14 schelcj if i have a route name or url, can i reverse it to give me the controller and action?
23:45 disputin joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary