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

IRC log for #mojo, 2017-07-31

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

All times shown according to UTC.

Time Nick Message
00:53 Kundun joined #mojo
02:54 noganex joined #mojo
04:45 mib_ocyo87 joined #mojo
06:02 bianca joined #mojo
06:31 coolo joined #mojo
06:40 bianca joined #mojo
06:41 Vandal joined #mojo
06:44 trone joined #mojo
07:00 AndrewIsh joined #mojo
07:07 bianca joined #mojo
07:38 sri but i guess we've also not seen any complaints... so that's a plus
07:54 mib_50w2nc joined #mojo
08:06 bianca joined #mojo
08:50 gregf_ joined #mojo
09:29 irqq joined #mojo
10:48 marcus I think I'm going to close #1101 - Doesn't seem like it has attracted any interest.
11:18 tchaves joined #mojo
11:22 ashimema working on sending json over websockets
11:23 ashimema is there an option to enable json encoding of the message your sending by default, or is that something one is expected to do before calling ->send($message) ?
11:23 * ashimema may have missed it in the docs somewhere.. been having a quick trawl through this morning so see if I missed somthing
11:26 ashimema aha..
11:26 ashimema I was looking in the wrong place
11:26 ashimema ->send({json => $message}) for the win
11:26 ashimema should have just guessed that!
11:33 petru joined #mojo
12:00 stryx` joined #mojo
12:00 sri marcus: yea, it's lacking a few good use cases
12:25 bwf joined #mojo
12:39 jabberwok joined #mojo
12:53 kavuria joined #mojo
13:06 petru joined #mojo
13:17 gryphon joined #mojo
13:23 Pyritic joined #mojo
13:51 itaipu joined #mojo
14:16 marty joined #mojo
14:20 sri i'll close https://github.com/kraih/mojo/pull/1115
14:20 gizmomathboy joined #mojo
14:27 sri and https://github.com/kraih/mojo/pull/1096
14:28 itaipu joined #mojo
14:33 marty joined #mojo
14:54 ashimema I'm seeing a number of 'DBD::Pg::db do failed: server closed the connection unexpectedly' in my app when using Mojo::Pg pubsub and morbo
14:55 ashimema wondering if anyone has any experience of getting that and any hints on a solution
14:55 * ashimema tries to come up with a narrow example so the question isn't so broad
14:57 * ashimema digs out jbergers VueChat example and starts hacking at it until it breaks in the same consistent manor
15:00 jeck joined #mojo
15:12 bianca joined #mojo
15:23 sri btw. i'm not actually finishing :has support https://github.com/kraih/mojo/pull/1115#issuecomment-319100856
15:23 sri in case someone else is interested in the feature
15:34 Lee[home] joined #mojo
15:37 sri hmm, during development it would be kinda nice to be able to run a minion job in the foreground over and over
15:38 sri just noticed i'm using a rather ugly eval command hack for that *a lot*
15:38 sri XCDCHK_CONF=staging/do_not_commit/xcdchk.conf ./script/xcdchk eval -V 'XCDCHK::Task::Sync::_sync(app->minion->job(1))'
15:40 sri _sync is the function containing the actual task
15:40 sri $app->minion->add_task(sync => \&_sync);
15:51 PryMar56 joined #mojo
16:04 perlpilot joined #mojo
16:06 kavuria joined #mojo
16:10 sri something like $minion->job(1)->foreground
16:11 sri purely for task development
16:12 sri and maybe myapp.pl minion job -f 1
16:14 sri seems rather simple actually, since we don't really want to dequeue the job
16:14 sri or properly finish/fail it
16:16 sri hmm
16:16 sri or perhaps a way to run tasks without a job
16:18 sri $minion->run_job(foo => \@args => \%options);
16:19 sri and it takes care of creating a worker, enqueueing a job, dequeueing the job, and performing it in the foreground
16:19 sri it could work by using a special named queue
16:21 sri or rather a uuid-ish named queue only used for that one job
16:22 sri so it wouldn't even affect the rest of the system and you can use it to test stuff on live systems
16:22 sri (if you have to)
16:23 sri of course to make it work for jobs creating jobs you'd have to enqueue them into that queue
16:23 sri hmm
16:25 sri actually an intersting question
16:25 sri jobs enqeued from inside a job, should those default to the named queue "default", or the current named queue?
16:29 preaction i would say the default for any other job, it's easier to explain/document
16:30 preaction otherwise you have to say "... but if you're enqueuing a job from inside a job, the queue defaults to the current job's queue", which is something that's going to trip up anyone who does this
16:31 sri guess run_job might be easier to document this way too
16:31 sri a generic warning to watch out for side effects will do
16:33 * sri would like to get more opinions... this stuff is so easy to get wrong
16:34 sh14 joined #mojo
16:35 sri and i'm not entirely sure if it's better to rerun a specific job you enqueued manually over and over, or make a new one each time and perform it "properly"
16:35 sri coolo: didn't you want something like that too? (run a specific job in foreground for testing)
16:36 sri i mean, it might be nice to rerun a failed job in foreground
16:37 sri hmm
16:37 sri but that would mean properly finish/fail them without an actual worker that dequeued
16:38 sri in our case at work it would be awesome for measuring resource usage
16:40 arcanez wish I could pipe an rrdtool png directly to the browser instead of having to write it to disk and either read it in myself and output it or use ->static
16:42 rshadow joined #mojo
16:42 preaction why couldn't you?
16:43 arcanez RRDs::graph writes to a filename
16:45 preaction RRDs::graphv <- this function maybe instead?
16:51 arcanez graphv without a filename and ->{image}. guess I never read that through. stopped at the size and positions stuff
16:52 preaction yeah, it's not very clear at all...
16:52 arcanez "When calling with and empty filename than the contents of the graph will be returned in the hash as well (key 'image')."
16:52 arcanez 'with an empty filename' and than -> then
16:53 preaction i'm not sure if the RRDTool::OO module has better things for you. it was about that time i gave up on using RRDTool and tossed everything in Graphite
16:54 arcanez I'd like to use a TSDB or elasticsearch
16:55 arcanez but as it stands, there is good infrastructure in place to poll data and put it into rrds and then graph them. trying to pull pieces out of Apache mod_perl land and speed them up
16:55 arcanez but I think nfs is our bottleneck
16:57 preaction sorry, not saying that you should do what i did, only that i can't help you any further as we've reached the limits of my knowledge
16:57 preaction i still actually like rrdtool, it's very unix, but its APIs leave a bit to be desired...
16:59 arcanez I think we should move forward, but it's difficult with large amounts of existing data and infrastructure that already works
17:00 arcanez https://github.com/oetiker/RrdGraphJS is somewhat intriguing, but using qooxdoo instead of jquery :/
17:00 arcanez was interested in using http://code.shutterstock.com/rickshaw/examples/ to graph (regardless of the backend)
17:34 tchaves joined #mojo
17:40 inokenty joined #mojo
17:53 coolo sri: yes. I needed to run a job in foreground to trace it
17:59 itaipu joined #mojo
18:15 petru joined #mojo
18:18 sri coolo: would you prefer to run a specific existing job or create a new one with the same arguments/options?
18:19 sri "myapp minion job --rerun-job-in-foreground 123" vs "myapp minion job -f foo -a '["some arg"]'"
18:20 coolo sri: run a preexistant failed job in the foreground
18:27 Lee joined #mojo
18:31 sri thought you'd say that
18:32 sri and it doesn't seem to hard to implement actually
18:32 sri *too
18:32 sri $minion->job(123)->foreground basically
18:32 sri no actual worker involved
18:33 sri but it calls $job->finish/fail when the job is finished
18:33 sri biggest question is if it should do a Mojo::IOLoop->reset
18:34 sri it might be problematic if people assume they can call it from their app and do stuff afterwards
18:35 sri and it might be problematic too if people assume it behaves exactly like a job performed in a background process
18:35 sri ¯\_(?)_/¯
18:36 sri but really, people shouldn't be calling it from their app
18:38 arcanez can you enqueue a minion task and use the result in a ->render?
18:41 preaction there's a hack that will wait for a minion job to finish so it can be used to display the result, but that's not really the point of minion
18:42 arcanez I'd like to async my rrdtool graphing and have it show up when it's done.. but I guess with multiple workers, I don't care if it blocks
19:02 irqq joined #mojo
19:28 irqq_ joined #mojo
19:46 zivester joined #mojo
19:53 petru joined #mojo
20:02 mcsnolte joined #mojo
20:04 itaipu joined #mojo
20:16 CandyAngel On a site I made, a placeholder image is created and then the Minion job just replaces it
20:23 itaipu joined #mojo
20:48 arcanez I think we do <img onload="..." onerror="..." />
21:36 marty joined #mojo
21:44 sri think this is a pretty good solution https://github.com/kraih/minion/commit/787cc1935115f0957401ac20dd74f72fabecdbbb
21:46 sri but -f needs a better description
21:47 sri it's kinda dangerous if used wrong
21:51 sri think the warning is needed https://github.com/kraih/minion/commit/38b531a707e9697d7844e3d9ca31dab9fea07d15
22:02 Gedge joined #mojo
22:08 sri hmm, looks like i broke everything :o
22:31 arcanez sri++ # <@sri> hmm, looks like i broke everything :o
22:37 sri argh, time is up, i guess minion master will stay broken until tomorrow
22:38 sri need to add $worker->dequeue(0 => {id => 123, queues => ['minion_foreground']})
22:38 sri so a specific job id can be dequeued
22:38 sri and the job will have to be moved to a special named queue, so there is no risk of a worker picking it up randomly
23:28 tchaves joined #mojo
23:50 sivoais joined #mojo

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