docbrown/spec
Jamie Gaskins 9423060299
Fan out Feeds::ImportArticlesWorker (#16818)
* Fan out Feeds::ImportArticlesWorker

Doing all that work within a single Sidekiq job has begun taking over an
hour on DEV. Regardless of the reasons we did it that way originally, we
should be able to handle this concurrently. If we cannot, we need to
investigate why and handle it properly rather than consigning it to
sequential work.

* Fix specs

The specs make assumptions about how the code under test is implemented.
This commit does not change that, as much as I would like to. Instead,
it just aligns the assumptions with the new implementation.

The previous tests didn't actually represent reality though, since we
can't get a Time or ActiveSupport::TimeWithZone instance inside of the
`perform` method while running it through Sidekiq. Instead, the specs
seem to be relying on the fact that the time instance gets serialized to
ISO-8601/RFC3339 format and that that format is understood by Postgres.
Otherwise, I'm not sure how it would work in production as written.

The new specs reflect reality more closely. The `earlier_than` value
will be converted into an ISO8601/RFC3339 string when passed through
Sidekiq.

* Add parens to perform_bulk call

Turns out, we actually do this pretty consistently. I could've sworn I
saw a bunch of these calls without parens. ¯\_(ツ)_/¯

* Improve variable naming

This is not a list of ids, it's a list of lists of arguments for Sidekiq
jobs, the inner of which contains an id, but that's not the only thing
it contains.
2022-03-08 15:39:16 -05:00
..
controllers/concerns 15 minute fix: Add default argument to JsonApiSortParam (#13369) 2021-04-14 10:32:07 +07:00
decorators Refactoring cached_followed_tags (#16175) 2022-01-24 19:53:48 -05:00
factories Require profile fields to belong to a group (#16390) 2022-02-15 09:27:18 -06:00
fixtures Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
forms Clear changes to settings after checking form saves them (#15746) 2021-12-14 08:39:14 -06:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers extra tweaks for i18n (#16192) 2022-02-23 06:48:52 -07:00
initializers A suspended user returns 403 instead of 500 (#16408) 2022-02-04 09:42:23 -05:00
lib Renaming method for clarity (#16791) 2022-03-07 12:55:56 -05:00
liquid_tags Implement Loom Embed (not merging now) (#16633) 2022-02-22 09:05:55 -05:00
mailers "Reply to" and "From" Email addresses for SMTP Configurations (#16499) 2022-02-16 16:14:54 +02:00
models Adding indirection for Tag#name to ease future work (#16703) 2022-02-28 16:32:04 -05:00
policies Adding ArticlePolicy#moderate? (#16786) 2022-03-07 15:27:43 -05:00
queries Fixes a name conflict in Rpush models (#15978) 2022-01-07 09:38:16 -06:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests Redirect appended /moderate and /admin to the same page (admin member view) (#16779) 2022-03-03 19:40:03 -05:00
routing Scoping the :listing routes to feature (#16406) 2022-02-04 10:13:56 -05:00
sanitizers Don't sanitize anchor elements with no href (#16667) 2022-02-22 11:27:38 -06:00
serializers Refactoring to add helper method (#16064) 2022-01-12 11:21:44 -05:00
services Don't suggest author follows for anonymous visitors (#16825) 2022-03-08 11:15:06 -06:00
support Fix error in feed follow buttons where user name has apostrophe (#16758) 2022-03-02 15:53:48 -05:00
system Fix broken email settings documentation link (#16792) 2022-03-07 10:45:35 -06:00
tasks Make home link an admin-customisable navigation link (#16268) 2022-02-01 09:27:09 +00:00
uploaders Remove Remaining logo_svg Code (#16291) 2022-02-22 12:05:16 -07:00
validators Don't raise error when empty community emoji setting submitted (#15723) 2021-12-17 09:29:55 -06:00
view_objects Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
views quote localized strings in credits/purchase embedded script (#15623) 2021-12-01 10:07:55 -06:00
workers Fan out Feeds::ImportArticlesWorker (#16818) 2022-03-08 15:39:16 -05:00
i18n_spec.rb Show missing translation keys when test fails (#16637) 2022-02-17 16:21:29 -06:00
rails_helper.rb Let's be friends again, Rubocop (#16294) 2022-01-25 11:58:00 -05:00
spec_helper.rb Theme data update script, remove theme choices from UI (#15225) 2021-11-08 08:38:43 -05:00