-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reindex Check for Selectable Search Parameters #4813
Conversation
// check if reindex job is running | ||
using (IScoped<IFhirOperationDataStore> fhirOperationDataStore = _fhirOperationDataStoreFactory()) | ||
{ | ||
(var activeReindexJobs, var reindexJobId) = await fhirOperationDataStore.Value.CheckActiveReindexJobsAsync(cancellationToken); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
reindexJobId
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 9 days ago
To fix the problem, we need to remove the assignment to the reindexJobId
variable since it is not used anywhere in the function. This can be done by modifying the tuple deconstruction to only include the activeReindexJobs
variable.
- Remove the assignment to
reindexJobId
in the tuple deconstruction. - Ensure that the functionality of the method remains unchanged.
-
Copy modified line R240
@@ -239,3 +239,3 @@ | ||
{ | ||
(var activeReindexJobs, var reindexJobId) = await fhirOperationDataStore.Value.CheckActiveReindexJobsAsync(cancellationToken); | ||
var (activeReindexJobs, _) = await fhirOperationDataStore.Value.CheckActiveReindexJobsAsync(cancellationToken); | ||
if (activeReindexJobs) |
Description
Added in check for reindex job in progress when trying to update search parameter state using $status endpoint. Added unit test to verify.
Related issues
Addresses [issue AB#103503].
Testing
Added new unit test to cover.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)