[ ] Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
[ ] Regression (a behavior that stopped working in a new release)
[x ] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Current behavior
Expected behavior
We are setting data status from draft to Published. It worked fine in development with single cluster. However, after deployed in Production env with load balance, it did not work
Minimal reproduction of the problem
Create a schema and add some data
Update data status from Draft to Published using API
Run the Update in a clustered env with load balance
expected: Draft status to Published
Actual: Draft stay as draft without showing errors
there are 25000 records for the schema, of which 51 are in draft status. We need to set those 51 to Published status
Here is my code
private async Task SetStateAndOtherJurisdictionsToPublished()
{
var queryResult = await jurisdictionSquidexClient.GetAsync(new ContentQuery
{
Filter = "data/Level/iv eq 'state' or data/Level/iv eq 'other'"
}, QueryContext.Default.Unpublished(true));
foreach (var item in queryResult.Items)
{
await jurisdictionSquidexClient.ChangeStatusAsync(item, new ChangeStatus()
{
Status = WorkflowStatuses.Published
});
}
}
All works fine in our testing env with single cluster, but the status are not changed to Published in living env with cluster.
Hope this is understood.
So in summary we have some non-Published content where the Level property’s value is either state or other that we want to set as Published as a one off update.
Although there are 25000 records in the schema there should be far fewer, less than 100, matching that Filter. Apparently this worked well for us on a single instance (single worker and API node) but not when load balanced (one worker and one API node).
To be honest though I do not know why we are making this change via code as if it is less than 100 records and we are just changing the status we can easily just use the UI to do it, just two pages of bulk updating after applying the filters, for example: