backup chunk-size
This commit is contained in:
parent
9e6205a949
commit
92539449c4
@ -30,6 +30,7 @@ public class BackupSettings
|
||||
{
|
||||
public string UpgradesPath { get; set; }
|
||||
public int Limit { get; set; }
|
||||
public long ChunkSize { get; set; }
|
||||
public ServiceConfigurationElement Service { get; set; }
|
||||
public SchedulerConfigurationElement Scheduler { get; set; }
|
||||
public CleanerConfigurationElement Cleaner { get; set; }
|
||||
|
@ -36,19 +36,22 @@ public class BackupWorker
|
||||
private DistributedTaskQueue _progressQueue;
|
||||
private int _limit;
|
||||
private string _upgradesPath;
|
||||
private readonly TempPath _tempPath;
|
||||
private readonly TempPath _tempPath;
|
||||
private readonly SetupInfo _setupInfo;
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly object _synchRoot = new object();
|
||||
|
||||
public BackupWorker(
|
||||
IDistributedTaskQueueFactory queueFactory,
|
||||
IServiceProvider serviceProvider,
|
||||
TempPath tempPath)
|
||||
TempPath tempPath,
|
||||
SetupInfo setupInfo)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
_progressQueue = queueFactory.CreateQueue(CUSTOM_DISTRIBUTED_TASK_QUEUE_NAME);
|
||||
_tempPath = tempPath;
|
||||
TempFolder = Path.Combine(_tempPath.GetTempPath(), "backup");
|
||||
TempFolder = Path.Combine(_tempPath.GetTempPath(), "backup");
|
||||
_setupInfo = setupInfo;
|
||||
}
|
||||
|
||||
public void Start(BackupSettings settings)
|
||||
@ -59,7 +62,8 @@ public class BackupWorker
|
||||
}
|
||||
|
||||
_limit = settings.Limit;
|
||||
_upgradesPath = settings.UpgradesPath;
|
||||
_upgradesPath = settings.UpgradesPath;
|
||||
_setupInfo.ChunkUploadSize = settings.ChunkSize;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
@ -15,6 +15,7 @@
|
||||
"Cleaner":
|
||||
{
|
||||
"Period":"00:15:00"
|
||||
}
|
||||
},
|
||||
"ChunkSize": 20971520
|
||||
}
|
||||
}
|
@ -61,7 +61,7 @@ public class SetupInfo
|
||||
}
|
||||
|
||||
public string TeamlabSiteRedirect { get; private set; }
|
||||
public long ChunkUploadSize { get; private set; }
|
||||
public long ChunkUploadSize { get; set; }
|
||||
public long ProviderMaxUploadSize { get; private set; }
|
||||
public bool ThirdPartyAuthEnabled { get; private set; }
|
||||
public string NoTenantRedirectURL { get; private set; }
|
||||
|
Loading…
Reference in New Issue
Block a user