Class: Pgbus::Generators::AddStreamStatsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pgbus::Generators::AddStreamStatsGenerator
- Includes:
- ActiveRecord::Generators::Migration, MigrationPath
- Defined in:
- lib/generators/pgbus/add_stream_stats_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_migration_file ⇒ Object
22 23 24 25 |
# File 'lib/generators/pgbus/add_stream_stats_generator.rb', line 22 def create_migration_file migration_template "add_stream_stats.rb.erb", File.join(pgbus_migrate_path, "add_pgbus_stream_stats.rb") end |
#display_post_install ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/generators/pgbus/add_stream_stats_generator.rb', line 27 def display_post_install say "" say "Pgbus stream stats table installed!", :green say "" say "Next steps:" say " 1. Run: rails db:migrate#{":#{[:database]}" if separate_database?}" say " 2. Opt in by setting `config.streams_stats_enabled = true` in your" say " pgbus initializer (disabled by default — stream event volume can" say " be high, so stats recording is off unless you ask for it)." say " 3. View stream insights at /pgbus/insights" say "" end |