Skip to content

Use string values for Sidekiq workers

Joe Woodward requested to merge chore/use-string-keys-for-sidekiq-jobs into master

What does this MR do and why?

Use string values for Sidekiq workers

Sidekiq serializes worker args using JSON. JSON doesn't not have a symbol notation so these keys are being converted from symbols to strings which means what we're passing in, isn't what we're using during the workers.

In this case we are defensively programming to convert action.to_s so when we use perform_now or perform_async we're always working with strings so we don't have much risk here but sidekiq is logging warnings which makes the rspec output messy.

This change converts the values to strings and also removes the to_s conversion that isn't necessary anymore (we should allow this to raise if someone passes a symbol to perform_now)

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