-
Notifications
You must be signed in to change notification settings - Fork 75
v17/migrations - delegate tracking out of core. #921
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8bbf3d9
Change to a full set cache policity, so we hit the database less times.
KevinJump 53672a1
update the repo to catch errors (so we don't bork an import/site)
KevinJump a9ea9e3
Update uSync.Core/Persistance/SyncDataRespositoryBase.cs
KevinJump af5f1cb
Update uSync.Core/Persistance/SyncDataRespositoryBase.cs
KevinJump d08f6c8
Update uSync.Core/Migrations/SyncMigrateFullDataSetCachePolicy.cs
KevinJump de2e814
tidy up cache files.
KevinJump d30b6a4
clean up semaphore logic, so it can timeout (eventually)
KevinJump 0b0ce25
Update uSync.Core/Persistance/Cache/SyncFullDataSetRepositoryCachePol…
KevinJump 352e450
Update uSync.Core/Migrations/SyncMigratedDataRepository.cs
KevinJump 714eb63
Remove the individual cache policy items (we are using full data set …
KevinJump 430b409
tidy up cache polcy files.
KevinJump ad75caa
Update uSync.Core/Persistance/Cache/SyncFullDataSetRepositoryCachePol…
KevinJump 8799353
Update uSync.Core/Persistance/Cache/SyncFullDataSetRepositoryCachePol…
KevinJump 90a59d5
Clean the migrated table when someone does a clean export.
KevinJump d6dabb0
Merge branch 'v17/migrations-full-set-cache-policy' of https://github…
KevinJump 5be4ded
move deleteall into base service (and fix cache notification)
KevinJump 8d44ab4
Removes DB elements from uSync directly, and add new Tracker to pass …
KevinJump 37312ad
Update uSync.Core/Mapping/SyncValueMapperCollection.cs
KevinJump 687f55d
Ensure ISyncMapper new IsMapper method has default implimentation
KevinJump 97d6f45
Merge branch 'v17/migrations-full-set-cache-policy' of https://github…
KevinJump File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace uSync.Core.Mapping.Tracking; | ||
|
|
||
| /// <summary> | ||
| /// tracking for when editors might change. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// A tracker mapper can return additional ISyncMappers for an editor Alias | ||
| /// typically we do this when migrations has tracked that a new editorAlias | ||
| /// was once an a different editor alias. | ||
| /// </remarks> | ||
| public interface ISyncMapperTracker | ||
| { | ||
| Task<IEnumerable<ISyncMapper>> GetTrackingMappers(string editorAlias); | ||
| } |
26 changes: 26 additions & 0 deletions
26
uSync.Core/Mapping/Tracking/SyncMapperTrackerCollection.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| using Umbraco.Cms.Core.Composing; | ||
|
|
||
| namespace uSync.Core.Mapping.Tracking; | ||
|
|
||
| public class SyncMapperTrackerCollection | ||
| : BuilderCollectionBase<ISyncMapperTracker> | ||
| { | ||
| public SyncMapperTrackerCollection(Func<IEnumerable<ISyncMapperTracker>> items) | ||
| : base(items) | ||
| { } | ||
|
|
||
| public async Task<IEnumerable<ISyncMapper>> GetMappersAsync(string editorAlias) | ||
| { | ||
| if (this.Count == 0) return Enumerable.Empty<ISyncMapper>(); | ||
|
|
||
| var tasks = this.Select(x => x.GetTrackingMappers(editorAlias)); | ||
| var results = await Task.WhenAll(tasks); | ||
| return results.SelectMany(x => x); | ||
| } | ||
| } | ||
|
|
||
| public class SyncMapperTrackerCollectionBuilder | ||
| : LazyCollectionBuilderBase<SyncMapperTrackerCollectionBuilder, SyncMapperTrackerCollection, ISyncMapperTracker> | ||
| { | ||
| protected override SyncMapperTrackerCollectionBuilder This => this; | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
uSync.Core/Migrations/Migrations/CreateMigratedDataTable.cs
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
uSync.Core/Migrations/Migrations/SyncMigratedDataMigrationPlan.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
58 changes: 0 additions & 58 deletions
58
uSync.Core/Migrations/SyncMigratedDataBuilderExtensions.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.