mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
fix: drop the global persistenceServiceFacade
This commit is contained in:
parent
a13ad2f6ab
commit
3d7cdd9938
|
@ -20,5 +20,5 @@ func TestNewDefaultIsolation(t *testing.T) {
|
||||||
assert.NotNil(t, isolation)
|
assert.NotNil(t, isolation)
|
||||||
assert.NotNil(t, isolation.persistenceServiceFacade)
|
assert.NotNil(t, isolation.persistenceServiceFacade)
|
||||||
assert.NotNil(t, isolation.gracefulShutdown)
|
assert.NotNil(t, isolation.gracefulShutdown)
|
||||||
assert.Equal(t, persistenceServiceFacade, isolation.persistenceServiceFacade)
|
assert.Equal(t, defaultPersistenceServiceFacade, isolation.persistenceServiceFacade)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,6 @@ var defaultPersistenceServiceFacade = &service.PersistenceServiceFacade{
|
||||||
Memory: service.NewMemoryService(),
|
Memory: service.NewMemoryService(),
|
||||||
}
|
}
|
||||||
|
|
||||||
var persistenceServiceFacade = defaultPersistenceServiceFacade
|
|
||||||
|
|
||||||
// Sync syncs the object properties into the persistence layer
|
// Sync syncs the object properties into the persistence layer
|
||||||
func Sync(ctx context.Context, obj interface{}) {
|
func Sync(ctx context.Context, obj interface{}) {
|
||||||
id := dynamic.CallID(obj)
|
id := dynamic.CallID(obj)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user