Commit graph

181 commits

Author SHA1 Message Date
Molly Struve
e0c37442c3
[deploy] Refactor:Move Enqueueing Podcast Workers to Sidekiq Cron (#9983) 2020-08-24 16:28:57 -05:00
Molly Struve
513717e680
Refactor:Move Credit Counter Cache Sync to Sidekiq (#9972) 2020-08-24 14:20:11 -05:00
rhymes
66b5cb513f
[deploy] Add dependent clauses to relations for Organization and add cleanup scripts (#9932)
* Add dependent clauses to has_many relations in Organization

* Add cleanup scripts

* Update script

* Destroy organizations listings

* Update lib/data_update_scripts/20200822082229_remove_orphaned_notifications_by_organization.rb

Co-authored-by: Molly Struve <mollylbs@gmail.com>

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-24 19:35:02 +02:00
Molly Struve
972253a17b
Refactor:Remove save_nil_hotness_scores Task (#9930) 2020-08-24 10:20:19 -05:00
Molly Struve
d4a2f24c88
[deploy] Refactor:Move Cache Busting Rake Tasks to Sidekiq (#9931) 2020-08-24 08:23:11 -05:00
Molly Struve
e07c707ede
[deploy] Refactor:Move remove_old_notifications Rake Task to Sidekiq (#9936)
* Refactor:Move remove_old_notifications Rake Task to Sidekiq

* fix typo
2020-08-24 08:48:46 -04:00
rhymes
5f02c35ece
Fix Rubocop violations and merge Listing specs (#9963) 2020-08-24 12:04:29 +02:00
Molly Struve
8574153b07
[deploy] Refactor:Move Remove Old HTML Variant Data task to Sidekiq (#9925) 2020-08-22 18:36:22 -05:00
Molly Struve
4308914fe8
[deploy] Refactor:Move send_email_digest Rake Task to Sidekiq (#9929) 2020-08-22 08:26:30 -05:00
Molly Struve
060ed32c48
Refactor:Send Welcome Broadcast Notifications From Sidekiq (#9923)
* Refactor:Send Welcome Broadcast Notifications From Sidekiq

* remove old spec and add to new one
2020-08-21 12:57:08 -04:00
Molly Struve
e8b14dec83
Refactor:Move prune_old_field_tests Rake to Sidekiq Cron (#9924) 2020-08-21 12:56:42 -04:00
Molly Struve
f00bb8eb8c
[deploy] Refactor:Move Listing and Support Tag Tasks to Sidekiq (#9898) 2020-08-20 14:05:34 -05:00
Molly Struve
ae4080a6ef
[deploy] Refactor:Move Tag Badge and Github Badge Awards to Sidekiq (#9885) 2020-08-20 08:41:36 -05:00
rhymes
03ed8aedb1
[deploy] Remove orphaned polls related rows (#9855) 2020-08-20 10:40:01 +02:00
Michael Kohl
eff28766fc
[deploy] Migrate profile data (#9750)
* Add temporary Rake task for creating profile fields

* Fix problems after splitting branch

* Add profile migration Rake task

* Add unique index to profiles

* Add migration code to users

* Be smarter about updating profiles

* Update spec

* Update Bullet config

* Fix typo

* Change temporary rake task to data update script

* Re-add profile factory and update spec

* Change private declaration to make CodeClimate happy

* Update comment

* Drop validation in favor of DB default

* Update spec
2020-08-20 11:17:57 +07:00
Molly Struve
adc9c2ab3c
Optimization:Collect More Specific Data From Sidekiq Jobs (#9882) 2020-08-19 21:24:08 -04:00
Molly Struve
469ce3c533
Refactor:Move Streak Badges to Sidekiq Cron (#9872) 2020-08-19 14:53:03 -04:00
Molly Struve
960c51fbc0
[deploy] Refactor: Move beloved comment Badge to Sidekiq Cron (#9861) 2020-08-19 09:12:45 -04:00
Molly Struve
b003f45de8
[deploy] Bug Fix:Execute Hypershield Refresh Task (#9858) 2020-08-18 14:35:27 -05:00
rhymes
1375bf676e
[deploy] Nullify article_id for HtmlVariantTrials linked to non existing articles (#9845) 2020-08-18 14:51:06 +02:00
Molly Struve
dec9847589
Revert "Add Logging Statements to Debug Hypershield Refresh Not Working on Heroku (#9838)" (#9839)
This reverts commit acff871235.
2020-08-17 19:22:38 -05:00
Molly Struve
55e7e12e78
[deploy] Refactor:Move Yearly Badge Awarder to Sidekiq Cron (#9836) 2020-08-17 20:19:14 -04:00
Molly Struve
acff871235
[deploy] Add Logging Statements to Debug Hypershield Refresh Not Working on Heroku (#9838) 2020-08-17 18:39:19 -05:00
Molly Struve
8d66d3c492
[deploy] Feature:Move Metric Rake Tasks to Sidekiq Cron (#9794) 2020-08-17 11:47:25 -05:00
Michael Kohl
2b3242087c
[deploy] Start using profile model (#9724)
* Persist attribute_name for profile fields

* Update fields

* Add temporary Rake task for creating profile fields

* Update specs

* Fix problems after splitting branch
2020-08-17 09:57:50 +07:00
Molly Struve
0a64ac067b
[deploy] Remove ENVied Gem, Use dotenv Take 2 (#9767) 2020-08-14 12:20:47 -05:00
rhymes
0f6baaf4ba
[deploy] Remove orphaned DisplayAdEvent rows (#9765)
* Remove orphaned DisplayAdEvent rows

* Add dependent in the has_many relationship between ads and ad events
2020-08-14 09:29:08 -04:00
rhymes
e727956640
Revert "[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)" (#9757)
This reverts commit 1be8c72206.
2020-08-12 13:28:38 -04:00
Molly Struve
1be8c72206
[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)
* Refactor:Remove ENVied Gem in Favor of Default application.yml

* Copy sample_application.yml for Travis

* Create .env_sample file, Warn of missing ENV variables, ignore .env file

* Use dotenv For ENV variables and create Rake Task to Populate

* Update docs to copy .env_sample file

* make application config a bit more resilient

* update more documentation and only initialize dotenv in dev and test

* Update doc code snippet types and refactor rake task and app config

* remove push defaults

* Make initializers more resilient, remove unused ENV from travis

* Exit new rake task if application.yml does not exist, include dotenv in docs
2020-08-12 11:01:38 -04:00
rhymes
d337f5ee41
[deploy] Add foreign keys to Ahoy models (#9636)
* Add foreign keys to Ahoy models

* Empty incorrect script

* Delete with SQL

* Moved cleanup script in #9710

* Trigger Travis correctly
2020-08-11 20:46:17 +02:00
rhymes
3a56e4b442
[deploy] Cleanup orphaned Ahoy rows in the DB (#9710)
* Cleanup orphaned Ahoy rows in the DB

* Trigger Travis correctly
2020-08-11 16:20:54 +02:00
Alex
d200959809
[deploy] Improve clean up of user language settings (#9671) 2020-08-10 14:51:38 -04:00
rhymes
085c60992b
Rubocop: Enable and fix Style/OptionalBooleanParameter cop (#9711)
* Enable and fix Style/OptionalBooleanParameter cop

* Keep regular parameters for workers

* Keep regular parameters for workers

* Fix spec

* Trigger Travis correctly
2020-08-10 19:35:55 +02:00
Alex
c988481004
[deploy] Cleanup preferred_languages language_settings for users (#9641)
* Cleanup language settings for users

* Remove logic for old language format

* Make preferred_langagues_array.include? nil safe
2020-08-06 10:00:01 -04:00
Michael Kohl
c2d23cfc4d
[deploy] Seed profile fields (#9605)
* Fix schema.rb

* Add service objects for base and link fields

* Add link fields to seeds

* Make placeholder a keyword argument

* Add work fields

* Add explanation column to profile fields

* Add coding fields

* Switch from inheritance to mixin

* Add email checkbox to base fields

* Add branding fields

* Add spec for ProfileFields::FieldDefinition

* Move migration back into correct location

* Rename column from explanation to description

* Rename attribute in mixin

* chore: rename from explanation to description

* Add ProfileFields::ImportFromCsv

* Simplify ProfileFields::ImportFromCsv

* Add comment about disabled cop to spec

* Add TODO comment to Rake task

* Document mixin

* Add groups to profile fields

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-05 10:11:30 -04:00
Molly Struve
d120fc7e54
[deploy] Bug Fix:Rename Listing Search Field in Elasticsearch to Fix Searching (#9609) 2020-08-03 10:18:17 -05:00
rhymes
864b13b9ab
[deploy] Rubocop: fix Rails/HasManyOrHasOneDependent for Ahoy::Visit and Badge (#9565)
* Fix Layout/EmptyLines

* Fix Rails/HasManyOrHasOneDependent for Ahoy::Visit

* Fix Rails/HasManyOrHasOneDependent for Badge
2020-07-31 11:43:50 -04:00
Michael Kohl
26ee8f194c
Rubocop: Move from OpenStruct to Struct in Organization (#9431)
* Move from OpenStruct to Struct in Organization

* Add data update script

* Introduce Articles::CachedEntity model

* Update data update script for new model

* Fix comment

* Update jbuilder
2020-07-30 21:04:05 +07:00
rhymes
5a2cae4fbb
Rubocop: enable and fix new Rails cops (#9537)
* Enable new Rails/* cops and use autocorrect on them

* Fixed Rails/PluckInWhere leftovers

* Fix Rails/DefaultScope

* Enable and fix Rails/PluckId

* Fix manual mistake with forcing autocorrection on Rails/PluckId

* Apply PR feedback to remove Rails/PluckId inline disables

* Apply PR feedback to get rid of Rails/PluckInWhere inline
2020-07-29 11:14:19 +02:00
Molly Struve
34458d5de9
[deploy] Bug Fix:Run Hypershield Refresh AFTER db:prepare (#9546) 2020-07-27 17:30:02 -05:00
Ben Halpern
bffa204310
[MERGE AFTER INVITATION PR] Add registered_at data script (#9331)
* Add registered_at data script

* Update lib/data_update_scripts/20200715140848_backfill_user_registered_at.rb
2020-07-27 12:28:06 -04:00
Molly Struve
397c9ed2bf
[deploy] Bug Fix: Refresh Hypershield after db:prepare if Enabled (#9353) 2020-07-16 13:50:22 -05:00
Julianna Tetreault
4a0784f080
Hotfix: Fix Typo in backfill_broadcastable_type_for_broadcasts (#9292) [deploy]
* Fix typo and replace .each with .find_each in broadcastable_type data_update script

* Adjust data_update script name to trigger script rerun
2020-07-13 10:50:29 -06:00
Julianna Tetreault
5f143c4308
Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy]
* Add polymorphism to Broadcasts table
  - Adds a broadcastable_id column to Broadcasts
  - Adds a broadcastable_type column to Broadcasts

* Create Announcements and Welcome Notifications tables
  - Adds an Announcements table
  - Adds a Welcome Notifications table
  - Adds timestamps to both tables
  - Adds banner_style column to Announcements table

* Adds Announcement and Welcome Notification models
  - Adds an Announcement model in prep for polymorphism
  - Adds a WelcomeNotification model in prep for polymorphism

* Add data_update script to backfill type_of column for Broadcasts

* Add unique index on broadcastable_type and broadcastable_id on the Broadcasts table

* Add update! to the data_update script to backfill broadcastable_type
2020-07-13 09:36:19 -06:00
rhymes
8126c5c2c1
Rubocop: Address Metrics/BlockLength violations (#9246)
* Address Metrics/BlockLength violations

* Add jbuilder to package auto correct
2020-07-10 13:53:32 -04:00
Vaidehi Joshi
35b516a60d
Add metrics around welcome notifications + their click events (#9239)
* Log to DataDog when a welcome notification is created

* Fix typo in Metrics::RecordDailyUsageWorker

* Add Metrics::RecordDailyNotificationsWorker to log notification counts to DataDog

* Add specs around DataDog logging for welcome notifications + click events

* Call Metrics::RecordDailyNotificationsWorker from within log_daily_usage_measurables task

* Use user_id instead of user, move notification title into tags
2020-07-10 12:30:45 +02:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
rhymes
7309478420
Rails 6 autoloader: prepare liquid tags code (#8707)
* Move liquid patches to lib/liquid

* Rename classes properly
2020-06-17 16:50:14 +02:00
rhymes
380adc30ed
[deploy] Remove user_counters table (#8445) 2020-06-15 11:46:02 -04:00
rhymes
71d53873d1
Use Rails 6 new features in the code (#8342)
* Use pick instead of pluck first

* Use touch_all instead of update_all

* Use destroy_by instead of where.destroy_all

* Use scopes

* Fix db:seed:replant

* Remove ActiveSupport::Cache::RedisCacheStore expires_in cache
2020-06-08 16:06:29 -04:00