1515using Transfer . IGrains . DTx ;
1616using Vertex . Runtime ;
1717using Vertex . Runtime . InnerService ;
18+ using Vertex . Runtime . Options ;
1819using Vertex . Storage . Linq2db ;
1920using Vertex . Storage . Linq2db . Core ;
2021using Vertex . Stream . InMemory ;
@@ -66,25 +67,25 @@ private static IHost CreateHost()
6667 // serviceCollection.AddSingleton(memorySQLiteConnection);
6768 config . Connections = new Vertex . Storage . Linq2db . Options . ConnectionOptions [ ]
6869 {
69- new Vertex . Storage . Linq2db . Options . ConnectionOptions
70- {
71- Name = Consts . CoreDbName ,
72- ProviderName = "PostgreSQL" ,
73- ConnectionString = "Server=localhost;Port=5432;Database=Vertex;User Id=postgres;Password=postgres;Pooling=true;MaxPoolSize=20;" ,
74- } ,
70+ // new Vertex.Storage.Linq2db.Options.ConnectionOptions
71+ // {
72+ // Name = Consts.CoreDbName,
73+ // ProviderName = "PostgreSQL",
74+ // ConnectionString = "Server=localhost;Port=5432;Database=Vertex;User Id=postgres;Password=postgres;Pooling=true;MaxPoolSize=20;",
75+ // },
7576
7677 // new Vertex.Storage.Linq2db.Options.ConnectionOptions
7778 // {
78- // Name = Consts.core_db_Name ,
79+ // Name = Consts.CoreDbName ,
7980 // ProviderName = "MySql",
8081 // ConnectionString = "Server=localhost;Database=Vertex;UserId=root;Password=root;pooling=true;maxpoolsize=50;ConnectionLifeTime=30;"
8182 // },
82- // new Vertex.Storage.Linq2db.Options.ConnectionOptions
83- // {
84- // Name = Consts.core_db_Name ,
85- // ProviderName = "SQLite.MS",
86- // ConnectionString = "Data Source=InMemorySample;Mode=Memory;Cache=Shared "
87- // }
83+ new Vertex . Storage . Linq2db . Options . ConnectionOptions
84+ {
85+ Name = Consts . CoreDbName ,
86+ ProviderName = "SQLite.MS" ,
87+ ConnectionString = "Data Source=Vertex.SQLite.db; "
88+ }
8889 } ;
8990 } , new EventArchivePolicy ( "month" , ( name , time ) => $ "Vertex_Archive_{ name } _{ DateTimeOffset . FromUnixTimeSeconds ( time ) . ToString ( "yyyyMM" ) } ". ToLower ( ) , table => table . StartsWith ( "Vertex_Archive" . ToLower ( ) ) ) ) ;
9091
@@ -109,6 +110,14 @@ private static IHost CreateHost()
109110 {
110111 options . CollectionAge = TimeSpan . FromMinutes ( 5 ) ;
111112 } ) ;
113+ serviceCollection . ConfigureAll < SubActorOptions > ( options =>
114+ {
115+ options . SnapshotVersionInterval = 1 ;
116+ } ) ;
117+ serviceCollection . Configure < SubActorOptions > ( typeof ( AccountFlow ) . FullName , options =>
118+ {
119+ options . SnapshotVersionInterval = 10 ;
120+ } ) ;
112121 } )
113122 . ConfigureLogging ( logging =>
114123 {
0 commit comments