Skip to content

Pass string instead of symbol to Abuse::TrustScoreWorker#perform_async

Eugie Limpin requested to merge el-update-sidekiq-worker-arg-type into master

What does this MR do and why?

Pass string instead of symbol to Abuse::TrustScoreWorker#perform_async

The arguments you pass to perform_async must be composed of simple JSON datatypes: string, integer, float, boolean, null(nil), array and hash. This means you must not use ruby symbols as arguments.

https://github.com/sidekiq/sidekiq/wiki/Best-Practices

This change also removes the "Job arguments to Abuse::TrustScoreWorker must be native JSON types, but :arkose_global_score is a Symbol." error when running specs that calls the worker's perform_async method.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request reports

Loading