This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if Rails.env.training? | |
| has_attached_file :thumbnail, | |
| storage: :fog, | |
| fog_credentials: { | |
| aws_access_key_id: NitroConfig.get("s3/training_read_only_access_key"), | |
| aws_secret_access_key: 'production_secret_acesss_key' | |
| }, | |
| fog_directory: 'production_bucket_name' | |
| else | |
| has_attached_file :thumbnail, styles: { small: "75x75#", medium: '256x256#' }, default_url: ActionController::Base.helpers.image_path("/assets/logos/:style/power_logo_transparent.png") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 14:22 $ bundle exec cap production resque:pool:restart | |
| 00:00 resque:pool:stop | |
| 01 kill -s INT `cat /data/apps/ror/pws/shared/tmp/pids/resque-pool.pid` | |
| ✔ 01 [email protected] 0.067s | |
| ✔ 01 [email protected] 0.063s | |
| ✔ 01 [email protected] 0.066s | |
| 00:00 resque:pool:start | |
| 01 bundle exec resque-pool --daemon --environment production RUN_AT_EXIT_HOOKS=1 | |
| ✔ 01 [email protected] 1.400s | |
| 01 bundler: failed to load command: resque-pool (/data/apps/ror/pws/shared/bundle/ruby/2.3.0/bin/resque-pool) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MYSQL_WAIT_TIMEOUT_MAX = 2147483 | |
| def test_connection(extra_conf = {}) | |
| conf = { | |
| :host => "HOST_NAME", | |
| :username => "USER_NAME", | |
| :password => "PASSWORD", | |
| :database => "DATABASE_NAME", | |
| :adapter => "mysql2" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```bash | |
| 13:02 $ be cap production resque:pool:status | |
| 00:00 resque:pool:status | |
| --> production-nitro-task1: 558 | |
| --> production-nitro-task5: 34795 | |
| --> production-nitro-task2: 43016 | |
| --> production-nitro-task7: 10935 | |
| --> production-nitro-task6: 19400 | |
| --> production-nitro-task3: 15424 | |
| 00:01 resque:pool:training:status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 13:02 $ be cap production resque:pool:status | |
| 00:00 resque:pool:status | |
| --> production-nitro-task1: 558 | |
| --> production-nitro-task5: 34795 | |
| --> production-nitro-task2: 43016 | |
| --> production-nitro-task7: 10935 | |
| --> production-nitro-task6: 19400 | |
| --> production-nitro-task3: 15424 | |
| 00:01 resque:pool:training:status | |
| --> training-nitro-task1: 47102 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bundle exec rake dev:load_recent | |
| DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <main> at /Users/greg/code/nitro-web/components/core_models/lib/core_models.rb:4) | |
| DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <main> at /Users/greg/code/nitro-web/components/core_models/lib/core_models.rb:7) | |
| DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <main> at /Users/greg/code/nitro-web/components/core_models/lib/core_models.rb:7) | |
| DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from included at /Users/greg/code/nitro-web/components/nitro_search/lib/nitro_search/cachi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ChangeAttachmentFileSizeIntegerLimitOnDocumentVersion < ActiveRecord::Migration[5.1] | |
| def change | |
| change_column :document_versions, :attachment_file_size, :integer, limit: 8 | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def some_name(device_locations:) | |
| data = [] | |
| 0.upto(12).each do |i| | |
| data << device_locations.was_located_between(shift_right: i.hours, shift_left: (i+1).hours).count | |
| end | |
| data << device_locations.where(located_at:((Time.zone.parse('1970-01-01')).utc)..(13.hours.ago.utc)).count | |
| data.join(",") | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Loading development environment (Rails 5.1.4) | |
| [1] pry(main)> document = Document.new | |
| => #<Document:0x007faaa2018e80 | |
| id: nil, | |
| name: nil, | |
| active: true, | |
| created_by: nil, | |
| roles_count: 0, | |
| created_at: nil, | |
| updated_at: nil, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [10] pry(main)> document_type = DocumentType.new | |
| => #<DocumentType:0x007faaa05e92d0 | |
| id: nil, | |
| code: nil, | |
| name: nil, | |
| description: nil, | |
| owner_id: nil, | |
| active: nil, | |
| created_at: nil, | |
| updated_at: nil, |