Fix excessive sync job spawning #20
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made a mistake in #17 where I made
Syncjobs sync child instead of parent elements, then you @johnnynotsolucky correctly tried to fix that in another place causing the resulting code to sync parent and child elements, which then would also sync their child elements, resulting in a huge number of unnecessarySyncjobs to spawn when saving an entry that is inside a dependency chain.Apart from that, this PR adds a QoL feature to define a
namefunction that returns the name of a source for a given source handle. This is completely optional and only used for job descriptions. E.g. it now showsSync 'Element title' (index name)instead ofSync 12345678 in index name. That was helpful for debugging the above problem and I thought it could be useful in the future.