Commit graph

299 commits

Author SHA1 Message Date
Alex
4e5dc015b3 Move Search::IndexJob to Sidekiq (#5620) [deploy] 2020-01-22 08:24:53 -05:00
Michael Kohl
5b35370db8 Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
Shelley Vohr
b146528aa8 feat: add per-user Open Dyslexic font setting (#5037) [deploy]
* feat: add per-user Open Dyslexic font setting

* Adjust css slightly

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-01-20 18:23:57 -05:00
Dainius Stankevicius
8c43c3d484 Utilize NewComment::Send in Notification model (#5565) [deploy] 2020-01-20 16:38:42 -05:00
Ben Halpern
ba6c70c2d2 [deploy] Raise not_found for spam-banished users (#5586)
* Raise not_found for banished users

* Move banished logic to decorator
2020-01-20 14:50:22 -05:00
Alex
29af0b240a Remove NewFollowerJob and spec (#5569) [deploy]
* Remove NewFollowerJob and spec

* Remove NewFollowerJob from notification_spec
2020-01-20 08:27:33 -05:00
Alain Mauri
18b2b2cb4c Add Follows::CreateChatChannelWorker for Sidekiq (#5458)
* Added a new worker to create chat channels after a follow
* Moved the chat channe creation to after_create_commit hook
2020-01-20 08:23:44 -05:00
Alex
e1e075479b Create new NewFollowerWorker and start sending jobs to it (#5556) [deploy] 2020-01-17 15:08:50 -05:00
gverger
c7de0d762b Add let_it_be_readonly to avoid updating variables (#5407)
With let_it_be, we define variables that are created for the whole
context. In case we update them in an example, there might be a
discrepancy between the object and its value in the database, since the
database is cleaned between examples, but not the object itself.

This is what happened here with the `article` object. In one of the
tests, we update its organization, and in another, we reupdate it. The
problem is that the `article` object still thinks it has an
organization, but it has been cleaned in the database. So setting the
same organization id to the object doesn't trigger the SQL query, and
the article in the database still doesn't have an organization attached.

One solution is to use `reload: true` as a parameter of `let_it_be`: it
will reload the object from the database at the beginning of each test. To
make sure we don't have other dormant traps like this one, what I
propose is to either have `reload: true`, or to have the object
readonly to avoid getting to a difference between the object and its
database value.
2020-01-16 10:53:30 -05:00
Asha Balasubramaniam
81ead4935a Migrate Comments::BustCacheJob to Comments::BustCacheWorker and move to Sidekiq (#5502) 2020-01-16 10:20:13 -05:00
Lucas Hiago
74f9decc56 Change Notifications::RemoveAllJob to Notifications::RemoveAllWorker and move to sidekiq (#5451) 2020-01-15 12:34:12 -05:00
rhymes
9b2886979a ActiveRecord count optimizations (#5478) [deploy]
* Do not load messages in memory, just to count them
* Add Model.estimated_count
* Use Model.estimated_count in task record_db_table_counts
* Use size and estimated_count
* Use table_name so that .estimated_count works with all models
* Add comment to explain the .load.size + .each pattern
2020-01-14 12:03:38 -05:00
rhymes
241c39344e Destroy messages if chat channels are destroyed (#5498) 2020-01-14 09:46:40 -06:00
Anna Buianova
05884acd19 Fixed rubocop issues (#5506) 2020-01-14 09:45:26 -06:00
Alain Mauri
faa696444b Add Mentions::CreateAllWorker for Sidekiq (#5463) 2020-01-13 13:23:30 -06:00
Asha Balasubramaniam
e5960810cc Migrate Comments::SendEmailNotificationJob to Sidekiq (#5427)
* Add sidekiq version of the corresponding delayed job
* Switch the invocation of the delayed job from `after_create` to
`after_create_commit` to avoid the race condition where the worker can
be executed before the comment is persisted. Added covering spec
for this change.
2020-01-10 13:59:12 -06:00
Pablo Ifrán
bac4b7fac4 Move Users::ResaveArticlesJob to Sidekiq (#5398)
Change Resave Articles job to worker, and add missing specs on the user
model when changing the trigger attributes
2020-01-10 13:56:39 -06:00
Maykon Menezes
cf4dc80250 Move Podcast Episode Bust Cache Job to Sidekiq (#5416) [deploy] 2020-01-10 10:08:59 -06:00
Jenna Pederson
5c9302f5f1 Migrate subscribe to mailchimp newsletter job to sidekiq worker (#5423)
* Start migrating job to sidekiq worker
* Only check for badge jobs queued to sidekiq
2020-01-10 08:43:13 -06:00
Lucas Hiago
a86371e772 Remove TouchJob and do it Inline (#5410) 2020-01-09 17:22:09 -05:00
Mukesh Chaudhary
48edaab5bc Migrate new reaction job 5305 (#5401)
* Add New Reaction Worker

* Add Specs for the New Reaction Worker

* Update Worker Calls in Notification Model

* Update Notification Model Specs

* Fix Code Climate Issues

* Fix notification specs to remove instance variable and complex logic

* Fix Worker Spec

* Fix Review Comments

* Undo Job Specs

Co-authored-by: Mukesh Chaudhary <45253983+mukeshchdy@users.noreply.github.com>
2020-01-09 09:51:56 -05:00
Pablo Ifrán
f5d3593d4f Change the way that id_code was created (#5348) [deploy]
The column id_code was created with a job in an after create callback,
that was replaced by an inline creation of the attribute
2020-01-08 16:21:39 -05:00
Anna Buianova
e09e46ec99 Creating podcasts by users (#3730) [deploy]
* Create podcast as a user [WIP]

* Sample css for podcast form

* Nicer podcasts suggesting form

* Validate podcast feed_url

* Validate podcast main_color_hex

* Fix podcasts specs

* Fix form appearance

* Placeholder for podcast main_color_hex

* Provide a link to suggest a podcast

* Add a checkbox and a role for when a podcast is added by an owner

* Prettier checkbox in the podcasts form

* Added creator to podcasts

* Set the podcast creator

* Fix the /pod spec

* Added creator information to the internal podcast page

* Added cta class to the podcasts submit button

* Global notice when a podcast was suggested

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-01-08 16:14:25 -05:00
Maykon Menezes
a9cb13c3f6 moving org bust cache job to sidekiq (#5406) [deploy] 2020-01-08 15:03:40 -05:00
Molly Struve
7c939dc2c5
Remove TouchFollowerJob and do user update inline (#5391) [deploy] 2020-01-08 14:12:04 -05:00
Asha Balasubramaniam
1003f71c8f Migrate delayed job that calculates comment score to sidekiq (#5382) 2020-01-08 14:11:31 -05:00
serena
252027ad9c use new_badge_achievement_worker instead of active job (#5358) [deploy] 2020-01-07 08:16:17 -05:00
Molly Struve
a572a96921
Remove comments user_touch job and do it inline when comment is created (#5378) [deploy] 2020-01-06 15:52:59 -05:00
Molly Struve
bc2dbd8e7f
Move Events::BustCacheJob to Sidekiq and rename (#5379) 2020-01-06 15:51:46 -05:00
Cadu Ribeiro
93514e73df Migrate Articles/BustMultipleCachesJob to Sidekiq (#5309) [deploy]
Related to: #5305

In order to move all the jobs to Sidekiq, this commit creates a new
Articles/BustMultipleCachesWorker using Sidekiq based on the
Articles/BustMultipleCachesJob (this one is not removed until we know
that any job on this one will be performed).
2020-01-06 13:42:34 -05:00
Edward Tam
cb98b3b510 pages bust cache job sidekiq refactor (#5338) [deploy]
* Refactored Pages::BustCacheJob to Pages::BustCacheWorker
* Removed Pages::BustCacheJob and specs
Co-authored-by: Edward Tam <edward6882990@gmail.com>
2020-01-02 15:16:09 -05:00
Lud
df042d6b0b Refactors ActiveJob to SidekiqWorker: Follows::SendEmailNotificationWorker (#5322) [deploy]
* Refactors ActiveJob to SidekiqWorker: Follows::SendEmailNotificationWorker
* improves naming of User#receives_follower_email_notifications?
* adjust expect count for spec SendEmailNotificationWorker
2020-01-02 13:35:09 -05:00
Pablo Ifrán
783d43b737 Change create first reaction job to worker (#5327) [deploy] 2020-01-02 13:06:53 -05:00
Molly Struve
49545ae41f
Use SQL DELETE statement to delete notifications without a SELECT (#5303) [deploy] 2019-12-31 07:30:27 -06:00
rhymes
09e5ad5c0c Remove PushNotificationSubscription (#5258) [deploy] 2019-12-27 13:45:38 -06:00
rhymes
d015fb7c85 Remove search keywords (#5259) [deploy] 2019-12-27 12:40:20 -05:00
Molly Struve
f527f2ca3f
ensure that article tag_list always has more than 3 tags by stubbing the method (#5263) 2019-12-27 10:04:21 -06:00
rhymes
dbaf37e712 Create less data for fast_destroy_old_notifications spec (#5256) [deploy] 2019-12-27 09:55:42 -06:00
Molly Struve
f86f93bc8a
Create rake Task to Destroy Old Notifications (#5180) [deploy] 2019-12-26 13:17:34 -06:00
Anna Buianova
31d51999df Rubocop fixes (#5244) 2019-12-26 11:52:36 -05:00
Ben Halpern
c70042655f
Fix off by one for nth_published_by_author (#5233) [deploy] 2019-12-23 19:59:30 -05:00
Ben Halpern
4a1819f1e6
Fix off-by-one in nth_published_by_author (#5232) [deploy] 2019-12-23 19:38:20 -05:00
Ben Halpern
03c2404b13
Redo /mod for performance and usability (#5230) [deploy] 2019-12-23 18:10:25 -05:00
Ben Halpern
5812ecc383
Open /connect sidecar links in iframe (#5203) [deploy]
* Use iframe for connect sidecar

* Modify css of lefthand sidebar

* Add proper sidecar markup

* Update tests
2019-12-21 15:46:36 -05:00
Abner Soares Alves Junior
536c62da89 Refactor all has_enough_credits to enough_credits (#5119) 2019-12-16 15:00:59 -05:00
Keith Bennett
70e1ffbbc3 Fix rubocop Rails.root.path complaints (#5114) 2019-12-16 12:13:15 -05:00
Molly Struve
9912bbcdb8
Asynchronously Update Algolia after a PageView Update (#5076) [deploy] 2019-12-13 14:07:33 -06:00
Spencer
82f5bb9cdd Mod tooling: add tags via /mod refactor (#5017)
* mod view form changes

* add error validation for removal tag

* add error validation to tag_list count

* re-render tag_adjustment form errors

* refactor admin delete adjusted tags form

* add prompt to tag adjustment form select

* front end validations to add/remove tag_adjustment

* allow tag_mod to undo own tag adjustment

* update/add specs

* update send spec

* update tag adjustment spec
2019-12-13 13:02:45 -05:00
Bolarinwa Balogun
8c6adac7ba Remove special characters in tags for articles created via API (#4239) [deploy] 2019-12-13 11:29:02 -05:00
Anna Buianova
bbc5f95d86 Fix Algolia deserialization errors by indexing by record_type and id rather than AR object (#5063) [deploy] 2019-12-11 11:49:35 -06:00