diff options
author | nicobz25 <nico@alias-serveur.com> | 2017-04-05 13:48:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 13:48:31 +0200 |
commit | 6201fba2d3bcb38d2728b0f21a98fbd4c3b9205a (patch) | |
tree | 493580d1216ac32f9db414ff9cf2567ae56d0c25 | |
parent | 9572282a559a07196e62190a852aacbd94968c71 (diff) | |
parent | cfe91ac984fcabcc1980e88367dd636f0a8cc799 (diff) |
Merge branch 'master' into patch-1
-rw-r--r-- | app/lib/feed_manager.rb | 2 | ||||
-rw-r--r-- | db/migrate/20170405112956_add_index_on_mentions_status_id.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 2cca1cefe..88f6f4a46 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -39,7 +39,7 @@ class FeedManager def broadcast(timeline_id, options = {}) options[:queued_at] = (Time.now.to_f * 1000.0).to_i - ActionCable.server.broadcast("timeline:#{timeline_id}", options) + redis.publish("timeline:#{timeline_id}", Oj.dump(options)) end def trim(type, account_id) diff --git a/db/migrate/20170405112956_add_index_on_mentions_status_id.rb b/db/migrate/20170405112956_add_index_on_mentions_status_id.rb new file mode 100644 index 000000000..3ed1a20cf --- /dev/null +++ b/db/migrate/20170405112956_add_index_on_mentions_status_id.rb @@ -0,0 +1,5 @@ +class AddIndexOnMentionsStatusId < ActiveRecord::Migration[5.0] + def change + add_index :mentions, :status_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 3aaa3e3ad..b5d55fa16 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170403172249) do +ActiveRecord::Schema.define(version: 20170405112956) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -127,6 +127,7 @@ ActiveRecord::Schema.define(version: 20170403172249) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree + t.index ["status_id"], name: "index_mentions_on_status_id", using: :btree end create_table "mutes", force: :cascade do |t| |