开启sqlite wal模式
parent
22afd52378
commit
c6de7d19a1
|
|
@ -14,7 +14,7 @@ namespace Hopetry.Provider
|
|||
{
|
||||
return new SqlSugarClient(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = @"DataSource=minio.db", // 数据库路径
|
||||
ConnectionString = @"DataSource=minio.db;Journal Mode=WAL;", // 数据库路径
|
||||
DbType = DbType.Sqlite, // 数据库类型
|
||||
IsAutoCloseConnection = true, // 自动释放
|
||||
InitKeyType = InitKeyType.Attribute // 从实体特性中读取主键信息
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ public class DownViewModel : MvcViewModelBase
|
|||
{
|
||||
var task = new MinioDownloadTask(_minioService, bucketName, objectKey, downDir, size);
|
||||
using var client = SqlSugarConfig.GetSqlSugarScope();
|
||||
//todo 文件总字节数
|
||||
//todo 锁库问题 下载多线程冲突
|
||||
client.Insertable(task).ExecuteCommandIdentityIntoEntity();
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue