Commit graph

13 commits

Author SHA1 Message Date
Alex
7ee8523ba3
Refactor EdgeCache (#11684)
* Refactor EdgeCache

* Update specs

* Add bust comment spec

* Fix more specs

* Use const_get

* Make methods private

* Add .discussion? decorator to Article

* Change variable name to article for clarity
2020-12-02 14:20:22 -05:00
Molly Struve
a16fc46f84
[deploy] Revert "Async Handle Notifications for Comments When Saved (#9680)" (#9686)
This reverts commit 852223dd86.
2020-08-08 20:16:27 -05:00
Molly Struve
852223dd86
[deploy] Async Handle Notifications for Comments When Saved (#9680) 2020-08-08 17:59:17 -05:00
Molly Struve
b40af82b66
Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556)
* Flaky Spec Fix:Remove let_it_be Test Prof Helper

* Spec cleanup and fixes
2020-07-29 11:31:01 +02:00
rhymes
40f54e317f
[deploy] Use Action Mailer parameterized syntax (#8853) 2020-06-23 13:48:41 -05:00
Molly Struve
cbe6b3bd70
[deploy] Skip updating a root comment if it doesnt exist (#7080) 2020-04-06 10:18:05 -05:00
Anna Buianova
f675b8e4fc
A couple of rubocop fixes (#6648) 2020-03-16 16:15:52 +03: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
Asha Balasubramaniam
81ead4935a Migrate Comments::BustCacheJob to Comments::BustCacheWorker and move to Sidekiq (#5502) 2020-01-16 10:20:13 -05:00
Anna Buianova
05884acd19 Fixed rubocop issues (#5506) 2020-01-14 09:45:26 -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
Asha Balasubramaniam
1003f71c8f Migrate delayed job that calculates comment score to sidekiq (#5382) 2020-01-08 14:11:31 -05:00
Pablo Ifrán
783d43b737 Change create first reaction job to worker (#5327) [deploy] 2020-01-02 13:06:53 -05:00