Commit graph

50 commits

Author SHA1 Message Date
Asha Balasubramaniam
11adeb3215 Migrate PodcastEpisodes::UpdateMediaUrlJob to PodcastEpisodes::UpdateMediaUrlWorker for Sidekiq (#5729) 2020-01-27 09:40:34 -05:00
Maykon Menezes
7ad7320add Worker/user self delete (#5698)
* Moving user self delete job to sidekiq

* Refactor/user self delete worker
2020-01-27 08:45:58 -05:00
Alex
62f3e31698
Move RssReaderFetchUserJob to Sidekiq (#5685) [deploy]
* Create RssReaderFetchUserWorker

* Create RssReaderFetchUserWorker spec

* Update reference to RssReaderFetchUserWorker

* Update spec for clarity

- Update fake user_id to 9999
- Update return for user.feed_url

* Add feed_url check before calling worker

* Update random user_id for queue test

* Update fake user_id argument in spec
2020-01-24 14:14:20 -08:00
Alex
4a7ecb2574
Move ExportContentJob to Sidekiq (#5688) [deploy]
* Create ExportContentWorker

* Create ExportContentWorker spec

* Update references to ExportContentWorker

* Fix UserSettings spec for sending email
2020-01-24 10:12:58 -08:00
Lucas Hiago
58439d3652 Change BustHomepageCacheJob to BustHomepageCacheWorker and move to sidekiq (#5581) 2020-01-24 12:59:34 -05:00
Asha Balasubramaniam
bc137ff762 Migrate PodcastEpisodes::CreateJob to PodcastEpisodes::CreateWorker for Sidekiq (#5633)
The tests around `Podcasts::Feed` helped catch a bug around the
migration of the podcast episode creation delayed job where the sidekiq
version was passing a string version of item hash to
`Podcasts::CreateEpisode` which was in fact expecting the hash to
contain symbols.
2020-01-23 15:37:43 -05:00
Alex
f6c2f46fbb
Move Search::RemoveFromIndexJob to Sidekiq (#5637) [deploy]
* Create RemoveFromIndexWorker

* Create spec for RemoveFromIndexWorker

* Update RemoveFromIndexJob to RemoveFromIndexWorker

- Update references from the job to the new worker
- Update specs to use the new worker
- Fix spec in comment_spec that causes linter/RuboCop violation

* Remove unnecessary argument nil check

* Update spec for missing data
2020-01-23 11:27:28 -08:00
serena
1297f1cb3e Replace Notifications::NotifiableActionJob with Notifications::NotifiableActionWorker for Sidekiq (#5588) [deploy] 2020-01-22 09:40:55 -05:00
Alex
4e5dc015b3 Move Search::IndexJob to Sidekiq (#5620) [deploy] 2020-01-22 08:24:53 -05:00
Alex
8cc791150c Move SlackBotPingJob to Sidekiq (#5615) 2020-01-22 08:24:33 -05:00
Maykon Menezes
ef1eb8d412 Refactor/user bust cache job (#5563)
* Refactor/user bust cache job

* Remove bust cache job old spec
2020-01-20 13:46:15 -05:00
Mukesh Chaudhary
3d14e2e6a6 Replace ProMemberships::PopulateHistoryJob with ProMemberships::PopulateHistoryWorker for Sidekiq 5305 (#5584) 2020-01-20 13:45:21 -05:00
Lucas Hiago
fb5cb7005c Change CreateJob to CreateWorker and move to sidekiq (#5559)
* Create new CreateWorker

* Create new spec for CreateWorker

* Change CreateJob to CreateWorker and move to sidekiq

* Update worker

* Update priority of Reactions Create Worker

* Remove leading spaces from spec
2020-01-20 11:29:13 -05:00
Alain Mauri
1217f1f08d Add mentions send email notifications worker (#5549)
* Added email notification worker for mentions
  * Modified the email generation to after_create_commit
  * Modified Mention model to use the new worker
  * Added tests for the worker
2020-01-20 08:24:42 -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
Ben Halpern
9fa5d3156a
Add article.comment_score metric calc and tracking (#5560) [deploy]
* Add article.comment_score metric calc and tracking

* Change from gauge to count

* Adjust key and tags
2020-01-19 15:21:19 -05:00
Alex
e1e075479b Create new NewFollowerWorker and start sending jobs to it (#5556) [deploy] 2020-01-17 15:08:50 -05:00
Ben Halpern
477f5af8eb
Send past week aggregate x day active user data to datadog (#5553) [deploy]
* Initial days active work

* Add active users count to datadog
2020-01-17 08:52:38 -05:00
rhymes
1bc0469b2d Add article's record key to Fastly Surrogate-Key to separate caches (#5543)
* Add article's record key to Fastly Surrogate-Key to separate caches

After #4744 we successfully setup an auto purging system based on Fastly's surrogate key based cache and purging API.
Unfortunately this worked only in the `:show` action as comments are their own tree-based resource.
The `:index` though, is related to a single article, so without the article's record key in the `Surrogate-Key` header the first time we hit the API the result would become the value stored in Fastly's API, for all articles.

* Fix commentable mock for job spec

* Add comment.commentable.purge to the worker as well

* Add more thorough tests for commentable
2020-01-17 08:45:47 -05:00
Ben Halpern
a4b86e3ff1
Add initial usage metrics for datatog (#5544) [deploy]
* Add initial usage metrics for datatog

* Make measurable name more clear

* Change name of daily usage worker

* Fix test names
2020-01-16 12:59:17 -05:00
Asha Balasubramaniam
81ead4935a Migrate Comments::BustCacheJob to Comments::BustCacheWorker and move to Sidekiq (#5502) 2020-01-16 10:20:13 -05:00
Molly Struve
5962d52a61
record background queue stats in a worker (#5533) [deploy] 2020-01-15 14:44:57 -05:00
Lucas Hiago
97aac4ef9b Change Notifications::MilestoneJob to Notifications::MilestoneWorker and move to sidekiq (#5454) [deploy] 2020-01-15 13:21:56 -05:00
Lucas Hiago
74f9decc56 Change Notifications::RemoveAllJob to Notifications::RemoveAllWorker and move to sidekiq (#5451) 2020-01-15 12:34:12 -05:00
Molly Struve
2e5a36e538
Log DB Table sizes in a Sidekiq Worker (#5518) 2020-01-15 12:33:14 -05:00
Michael Kohl
dba7e6ca60 Move Twitch webhook registration from ActiveJob to Sidekiq (#5414) 2020-01-14 11:55:35 -05:00
Anna Buianova
05884acd19 Fixed rubocop issues (#5506) 2020-01-14 09:45:26 -06:00
serena
6e9539415e Move welcome notification job to worker for Sidekiq (#5465) [deploy] 2020-01-13 13:28:23 -06:00
Alain Mauri
faa696444b Add Mentions::CreateAllWorker for Sidekiq (#5463) 2020-01-13 13:23:30 -06:00
Lucas Hiago
1ed6aca54a Change Webhook::DestroyJob to Wehook::DestroyWorker and move to sidekiq (#5424) [deploy] 2020-01-13 12:38:10 -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
Alain Mauri
c013079359 Move Classified Listing Cache Buster to Sidekiq (#5408) [deploy]
* Created the worker to bust cache for classified listings
* Created the related tests
* Removed the old job
2020-01-09 17:23:23 -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
Maykon Menezes
a9cb13c3f6 moving org bust cache job to sidekiq (#5406) [deploy] 2020-01-08 15:03:40 -05:00
Cadu Ribeiro
00a97b2051 Migrate Users/FollowJob to Sidekiq (#5403) 2020-01-08 15:03:18 -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
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
c1638cfd33
Create UpdateAnalyticsWorker to replace UpdateAnalyticsJob (#5331) 2020-01-02 13:05:12 -05:00
rhymes
73188cd836 Sidekiq: add test helpers (#5326) 2020-01-02 08:39:40 -05:00
serena
51df32552c Change MentionJob to MentionWorker and move to sidekiq (#5312) [deploy] 2020-01-02 07:57:08 -05:00
Molly Struve
8650f5c5aa
Create new BustCacheWorker and start sending jobs to it (#5302) [deploy] 2019-12-31 14:14:23 -05:00
Molly Struve
9ab150daac
Change RateLimitCheckerJob to RateLimitCheckerWorker and move to sidekiq (#5269) [deploy] 2019-12-27 16:09:25 -06:00