#RubyOnRails - 22 July 2018
« Back 1 day Forward 1 day »
[07:24:27] quazimodo: in rspec, if I set up an object graph with before(:all) and make changes to it within my it "does stuff" specs, then the transaction should roll back nad leave the object graph as though the spec had never executed, right
[07:25:16] quazimodo: basically, i'm getting bleed through from spec to spec of db changes on the stuff created in the before(:all) but i'm using transactinos around my specs so ... the update's & saves ought to be rolled back... riiiiight?
[07:35:37] jerome__: installed rails-5.2 and rails new is working fine, but rails generate scaffold ... just error about access denied for create directory at /run/user/1000/spring-504. OK... why does it try to do a job i don't want ? Why trying to create a directory inside this /run/user/1000 ? Is it the job of ruby to do stuff like this ?
[07:40:13] jerome__: also user uid 1000 is my own user the desktop is logged in, but i loggin http because my server use http, and i do code rails with http user.... why this ruby tryed to go make things there ? and how to config it to no more do things like that ?
[09:04:22] jerome__: rails-5.2 and haml generator configurtion: https://stackoverflow.com/questions/41705617/how-can-a-rails-5-app-auto-generate-haml-for-layouts-and-views
[09:05:25] jerome__: rails-5.2 and sass files (sass will be deprecated soon... use sassc thay said... well, rails g scaffold just failed to use sass... very good)
[09:36:28] jerome__: haml is ok (not sure for generators), but sassc seems to interest no one rails devs.
[18:50:53] sagax: strange, but with v5 ActiveRecord i don't have "ActiveRecord::Base.connection.create_database" and "ActiveRecord::Migrator.migrate"
[18:56:00] sagax: https://www.rubydoc.info/gems/activerecord/5.2.0/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter#create_database-instance_method
[23:22:03] badfish129: may not be the right place to ask this, but I have a design problem. One of my backend services receives requests upon which it spawns a worker thread to do some heavy processing and immediately responds 200 to the requests
[23:22:37] badfish129: the problem is, sometimes my service gets flooded with requests so it has to spawn tons of these worker processes
[23:23:02] badfish129: the worker processes however, call external apis, so when I get flooded, then I hit rate limiting
[23:23:34] badfish129: I only really need to process the last message in a batch of requests, but not sure how to design a system to ignore the first N and try to just do the last one