mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:34:04 +00:00
Syncing: move global ID generation logic to an overridable method
Also make all resource syncing-related listener closures static. Also correct return type for getGlobalIdentifierKey to string|int. (We intentionally do not support returning null like many other "get x key" methods would since such a case might break resource syncing logic. This is also why we use inline getAttribute() in the creating listener instead of calling the method.)
This commit is contained in:
parent
e079803025
commit
072fcc6326
3 changed files with 24 additions and 15 deletions
|
|
@ -146,7 +146,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
ResourceSyncing\Events\CentralResourceDetachedFromTenant::class => [
|
||||
ResourceSyncing\Listeners\DeleteResourceInTenant::class,
|
||||
],
|
||||
// Fired only when a synced resource is changed in a different DB than the origin DB (to avoid infinite loops)
|
||||
|
||||
// Fired only when a synced resource is changed (as a result of syncing)
|
||||
// in a different DB than DB from which the change originates (to avoid infinite loops)
|
||||
ResourceSyncing\Events\SyncedResourceSavedInForeignDatabase::class => [],
|
||||
|
||||
// Storage symlinks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue