Konstantin Mochalov

Results 29 comments of Konstantin Mochalov

It's not designed to be HTML-aware and diffs raw strings. So, tags might be unmatched, or even cut in the middle, this is normal. Outputting source tags as-is in html...

I managed to enable nrepl middleware for cider (repl for emacs), [in this branch](https://github.com/kolen/clj-minecraft/tree/cider-nrepl). However, without two parts of this middleware: `format` and `tracker`, that are causing problems during compile....

Might be related to new "login security" functionality on Instagram. After `instalooter login` I'm getting "confirm that it's you" dialog on Instagram pages. ![image](https://user-images.githubusercontent.com/24191/51420093-7600ec00-1ba0-11e9-9318-de325dd247e1.png) Also in mobile app: ![photo_2019-01-19_04-13-48](https://user-images.githubusercontent.com/24191/51420135-c8daa380-1ba0-11e9-8ef1-01cf786328a0.jpg) So,...

Now there's `edge_media_to_parent_comment`, which also contains `count`, but it's count of only top-level comments. If old behavior had to be preserved, comments should be counted by descending `edge_media_to_parent_comment` -> `edges`...

I no longer see this warning in our codebase after upgrading `temple` to 0.8.2. Not 100% sure that updating temple fixes this in all cases.

Activerecord pool may close connections in e.g. [`flush`](https://github.com/rails/rails/blob/88209624af758218246757eba8f0d17b71b3aef8/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#L677-L679). Closed connection state is distinct from just disconnected (i.e. by TCP connection reset). Closed connection can't be reconnected by `reset` method used...

Note that it only causes problems with `QC.enqueue` from Rails web app. It does not cause problems with worker, as long as tasks don't do `ActiveRecord::Base.clear_active_connections!`.

Seems that just replacing `ActiveRecord::Base.connection.raw_connection` with `ActiveRecord::Base.connection_pool.checkout.raw_connection`, as I proposed, will not work reliably: ActiveRecord has ["reaping"](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html#method-i-reap) feature that returns checked out connections to pool. It decides to recover connection...

Probably better way to fix this would be to leave `ActiveRecord::Base.connection.raw_connection` untouched, but to remove memoization of `@conn_adapter` in `Queue`. However, it also has setter `conn_adapter=`, and keeping API compatibility...

@siegy22 this might be due to connections taken with `ActiveRecord::Base.connection` are released to the pool by Action Pack's request handling cycle. To lease connection properly (according to [AR docs](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html)), `ActiveRecord::Base.connection_pool.checkout`...