Commit graph

17 commits

Author SHA1 Message Date
Meredith
fe0d9437e2
Remove redundant sidekiq configuration (#20807) 2024-03-29 11:47:40 -04:00
Meredith
2c0c4460e7
Resolve sidekiq warning (#20805) 2024-03-28 10:19:56 -04:00
Mac Siri
678dda8cf4
Routine Rubopcop lint fixes (#17844)
* Routine Rubopcop lint fixes

* Undo app_secrets_spec changes

* Fix broken spec
2022-06-07 10:17:16 -04:00
Michael Kohl
33195929aa
Bump to Rails 7.0.2.2 MVP (#15908)
* Update gems

* Update more gems

* Update @rails/ujs package

* Explicitly add sprockets-rails

* Gemfile update

* Run bin/rails app:setup

* Update redis-actionpack

* Update stats initializer autoloading

* Update acts-as-taggable-on

* Disable signed: true option in session store

* Switch back to released version of redis-actionpack

* Update Gemfile.lock

* WIP

* Update Rails and gems

* Move hair_trigger back to released gem

* Add explicit requires to initializers

* Update Rails version

* Add more explicit require_relative calls

* Re-enable ForemStatsDriver

* Update schema

* Temp spec changes

* Bullet started raising errors?

* Fix broken spec

* Temporarily disable hair_trigger_spec

* Refactor

* Fix spec

* Enable use_rfc4122_namespaced_uuids

* Revert "Enable use_rfc4122_namespaced_uuids"

This reverts commit 5dac3722284bb08049586bfa943405f8a01289df.

* Temporarily deploy to canary

* Revert "Temporarily deploy to canary"

This reverts commit 04f8469501fab2a3177450baf051ff6259c41827.

* Update Containerfile

* Add comments to specs

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-03-30 15:00:33 -04:00
Daniel Uber
4b4d8a7234
Ensure arguments to perform_async are json safe (#16285)
* Convert symbol hash keys to strings when calling .perform_async

Fixes a warning from Sidekiq 6.4.0+ about perform_async arguments
which are not equal when passed to perform (`JSON.parse(JSON.dump(arg))`
should equal arg).

This is a safety measure to prevent passing objects (like classes, or
model instances) rather than their representations (like a class name,
or a model's attributes hash).

This warning will be an error in sidekiq 7

* Turn warning into an error in non-production environments

* Use string keys for reaction notification and article fetched

Missed these two on the first pass

* Update example argument hashes for #enqueues_on_correct_queue

Since this calls perform_async under the hood we need to pass json
safe hashes in the test cases as well.

https://github.com/forem/forem/blob/main/spec/workers/shared_examples/enqueues_on_correct_queue.rb

* Convert keys from FollowData#to_h to string before perform_async

I'm not sure enough where else (outside of notification) to_h is being
called, so I'm converting here when building args, rather than in
FollowData#to_h, which might be my next step.

* Let FollowData#to_h return a hash with string keys

Update spec to use string keys as well.

* Make to_h return string keys for ReactionData

Like FollowData, the #to_h method is only used to call
notifications (this is used to enqueue sidekiq jobs).

* Remove a key that was in the hash

Since reaction_data calls to_h, it gets string and not symbol,
keys. Call Hash#except with a key that was actually there.
2022-01-25 18:07:40 -06:00
Michael Kohl
13bf3c5ef0
Routine Rubocop autofixes (#14604) 2021-08-30 11:44:57 -04:00
Fernando Valverde
e6883ea63b
Explicitly adds the unique jobs middleware (#12441) 2021-01-27 08:16:55 -06:00
Molly Struve
d02a4cdc67
[deploy] Bug Fix:Increase look back time for Cron jobs to 120 seconds (#9797) 2020-08-17 11:11:52 -05:00
Molly Struve
05abf3839c
[deploy] Feature:Use Sidekiq to Run Scheduled Jobs (#9789) 2020-08-14 14:44:31 -05:00
rhymes
36786cf554
Rails 6: enable zeitwerk autoloader (#8766)
* More loading fixes

* Go back to OpenStruct

* Shuffle things around

* Remove obsolete patches and unneeded requires

* Disable config.add_autoload_paths_to_load_path

* Fix pre-require errors

* Config not reloader
2020-06-22 16:27:55 +02:00
Molly Struve
21d88399be
require worker_retries_exhausted_reporter in Sidekiq initializer (#6131) [deploy] 2020-02-18 07:56:11 -05:00
Molly Struve
4691ae1e34
Log in Datadog When Sidekiq Worker Fails for Final Time (#5942) [deploy] 2020-02-10 08:56:41 -05:00
Molly Struve
33d6dca565
Apply Monkey Patch To Attempt To Fix Sidekiq Admin UI (#5634) [deploy]
* set sidekiq session to be the same as Rails to prevent forbidden UI errors

* monkey patch rack until new version is released to make Sidekiq Admin work
2020-01-22 14:46:24 -05:00
Molly Struve
1a3d59c97f
Send Sidekiq data to Honeycomb (#5517) [deploy] 2020-01-16 12:30:43 -05:00
Molly Struve
9ab150daac
Change RateLimitCheckerJob to RateLimitCheckerWorker and move to sidekiq (#5269) [deploy] 2019-12-27 16:09:25 -06:00
rhymes
11689929ef Disable Sidekiq web sessions to make it work with Redis sessions (#5266) [deploy] 2019-12-27 12:04:50 -06:00
Molly Struve
2e661809b6 Introduce Sidekiq For Background Jobs (#5252)
* Introduce Sidekiq to the app and update RateLimitCheckerJob to use it

* fix rate limit checker spec with new sidekiq syntax

* add Sidekiq to tech stack overview

* Remove RateLimitChecker job change, add sidekiq web UI and testing support
2019-12-27 10:39:48 -05:00