Skip to content

Refactor PDSCascadingSearchJob to use strings#6738

Open
thomasleese wants to merge 3 commits intonextfrom
pds-cascading-job-strings
Open

Refactor PDSCascadingSearchJob to use strings#6738
thomasleese wants to merge 3 commits intonextfrom
pds-cascading-job-strings

Conversation

@thomasleese
Copy link
Copy Markdown
Contributor

@thomasleese thomasleese commented Apr 30, 2026

This is in preparation for converting this job to Sidekiq where all arguments need to be JSON serialisable, of which symbols are not.

We also store these values in a JSON blob on the PatientChangeset model so I think it makes sense to use strings here since they will be serialised in to strings anyway.

I've removed a describe block from the test to simplify the file, which has resulted in a whitespace change on each line as the code is de-indented.

Jira Issue - MAV-7288

@thomasleese thomasleese added this to the v8.3.0 milestone Apr 30, 2026
@thomasleese thomasleese added the refactor Improving maintainability label Apr 30, 2026
@thomasleese thomasleese modified the milestones: v8.3.0, v8.4.0 Apr 30, 2026
@thomasleese thomasleese force-pushed the pds-cascading-job-strings branch from 89e41f8 to fd215eb Compare April 30, 2026 10:53
@thomasleese thomasleese marked this pull request as ready for review April 30, 2026 10:53
@thomasleese thomasleese requested a review from a team as a code owner April 30, 2026 10:53
@thomasleese thomasleese force-pushed the pds-cascading-job-strings branch 4 times, most recently from 0f0fd91 to fc0155e Compare April 30, 2026 12:23
Since it doesn't need to be dynamic.

Jira-Issue: MAV-7288
This is in preparation for converting this job to Sidekiq where all
arguments need to be JSON serialisable, of which symbols are not.

We also store these values in a JSON blob on the `PatientChangeset`
model so I think it makes sense to use strings here since they will be
serialised in to strings anyway.

I've removed a `describe` block from the test to simplify the file,
which has resulted in a whitespace change on each line as the code is
de-indented.

Jira-Issue: MAV-7288
In the previous commit this job was converted to use string arguments.
This adds a fallback to ensure that if any existing jobs with symbols
are executed correctly.

Jira-Issue: MAV-7288
@thomasleese thomasleese force-pushed the pds-cascading-job-strings branch from fc0155e to 77d2ba7 Compare April 30, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Improving maintainability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants