<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28 29 30 31
00:21 filterfish joined
00:44 Renich__ joined
02:32 filterfish_ joined
02:33 filterfish_ joined
02:34 d762b440__ joined
02:34 aidalgol joined
02:35 d762b440__ joined
02:36 filterfish_ joined
02:37 filterfish_ joined
02:37 d762b440__ joined
04:38 glennpratt joined
06:03 glennpratt joined
07:35 ta_ joined
07:51 glennpratt joined
10:33 glennpratt joined
12:22 glennpratt joined
13:29 Bish joined
13:29 <Bish> tis channel does not have a backlog, right?
13:29 <Bish> i asked a question about background workers on databases, did anyone reply?
14:03 <Rennex> Bish: < onewheelskyward> Have you checked out rufus?
14:03 <Rennex> < onewheelskyward> https://github.com/jmettraux/rufus-scheduler
14:06 <Rennex> Bish: my own answer would be that Resque seems to be often used for various background jobs
14:15 joast joined
14:46 AYGHOR joined
14:46 <AYGHOR> EHLO
15:00 <riddley> huge fan of Sidekiq for background jobs
15:22 <Bish> those things all look way to sophisticated for me, i decided to use postgresql,ruby only for backend use
15:22 <Bish> no additional software
15:22 <Bish> sidekiq would still be ruby, so that would be fine
15:22 <Bish> but right now, my workers are docker container, busywaiting for work
15:22 <Bish> and my first worker now does DB.listen(:message) to wait for work, instead of busy-waiting
15:23 <Bish> i will also be able to dynamicially scale due to cpu load of those workers
15:23 <Bish> one problem that is missing is: what happens if one of those workers dies in progress of fullfilling his job
15:23 <riddley> sidekiq can help with that :)
15:24 <riddley> it's super simple to get started with
15:24 <* Bish> thinks about to retransmit the message in case of an error, which would be madness
15:24 <* Bish> looks at sidekiq now
15:25 <Bish> riddley: how would sidekiq help me with dying workers?
15:26 <Bish> i mean i dont really need background jobs, sicne all my workers will be foreground jobs
15:26 <riddley> if a worker dies, it gets put in the Dead queue. the code can be updated to handle the error and the job re-ran
15:26 <riddley> the job re-run is just a click or two vs something more painful
15:27 <Bish> hm, dead queue
15:29 tercenya joined
15:32 tercenya joined
15:35 AYGHOR joined
15:44 ta_ joined
16:34 <mmun> does anyone have any preferences for dealing with race conditions in find_or_create (we're using postgres)?
16:36 <jeremyevans> mmun: you probably want to use Dataset#insert_conflict if you are using PostgreSQL 9.5+
16:37 <mmun> would it make sense to global patch the finder methods to do this?
16:38 <mmun> my teammates have been wrapping their find_or_creates in `retriable on: Sequel::UniqueConstraintViolation`. I think it would be too difficult to police them to not use the finder APIs :'(
16:39 <mmun> i don't have good intuition for the problem. maybe retrying this way is fine most of the time.
16:48 <jeremyevans> mmun: I'm not sure if you could the global finder method to use insert_conflict, as insert_conflict's API is different (due to PostgreSQL INSERT ON CONFLICT requirements)
16:49 tercenya joined
17:26 Renich__ joined
18:15 tercenya joined
18:37 Renich joined
18:47 banditro_ joined
19:37 manveru joined
19:38 <adam12> jeremyevans: I'm getting models back without an id. Have you seen that before? Might be related to my join, but I have no idea where to start debugging.
19:39 <jeremyevans> adam12: Are you specifying the columns to select?
19:39 <adam12> jeremyevans: I am not - it's defaulting to '*'
19:39 <jeremyevans> adam12: If not, you probably have ambiguous column names
19:39 <adam12> I likely do from the join.
19:39 <jeremyevans> adam12: try specifying the column names you want to us
19:39 <jeremyevans> use
19:39 <adam12> SELECT * FROM "ip_addresses" LEFT JOIN "ip_allocations" AS "allocations" ON ("allocations"."ip_address_id" = "ip_addresses"."id") WHERE ("allocations"."id" IS NULL) LIMIT 1
19:40 <adam12> jeremyevans: Could I specify table.* ?
19:40 <jeremyevans> adam12: select_all(:ip_addresses)
19:40 <adam12> Perfect :)
19:41 <adam12> That did it.
19:49 avdi joined
20:03 <AYGHOR> self.destroy
20:11 mkaito joined
20:11 <mkaito> hi there! how do I set the default value for a column to be the current date/time?
20:12 <jeremyevans> mkaito: Best to set a database column default
20:13 banditron joined
20:14 <mkaito> I vaguely remember that it was something with a proc in the migration, but google is being unhelpful
20:18 <mkaito> jeremyevans: yeah that's the intention. `default: -> { Date.today }` doesn't work though.
20:21 <jeremyevans> mkaito: :default=>Sequel::CURRENT_DATE
20:36 banditron joined
20:37 <mkaito> thanks that worked :)
20:51 banditron joined
20:52 banditro_ joined
21:02 banditron joined
21:35 tercenya joined
22:54 GitHub94 joined
22:54 <GitHub94> [13sequel] 15jeremyevans pushed 10 new commits to 06master: 02https://git.io/vSq9P
22:54 <GitHub94> 13sequel/06master 14769cbc1 15Jeremy Evans: Fix code example for Model#valid?
22:54 <GitHub94> 13sequel/06master 14ce6a930 15Jeremy Evans: Add validation_contexts plugin for supporting custom contexts when validating...
22:54 <GitHub94> 13sequel/06master 14879e4ef 15Jeremy Evans: Deprecating calling Sequel::Qualifier with two arguments...
22:54 GitHub94 left
23:16 be_______ joined