replace saving background tasks in DB
This commit is contained in:
parent
3353de1e5d
commit
e7d5bf0c7e
52 changed files with 1423 additions and 1306 deletions
|
@ -116,8 +116,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
try
|
||||
{
|
||||
TaskManager.StartTask(taskId, "BACKUP", "BACKUP", backupFileName);
|
||||
TaskManager.ItemId = SecurityContext.User.UserId;
|
||||
TaskManager.StartTask(taskId, "BACKUP", "BACKUP", backupFileName, SecurityContext.User.UserId);
|
||||
|
||||
// get the list of items to backup
|
||||
TaskManager.Write("Calculate items to backup");
|
||||
|
@ -343,7 +342,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
TaskManager.IndicatorCurrent = TaskManager.IndicatorMaximum;
|
||||
BackgroundTask topTask = TaskController.GetTopTask();
|
||||
topTask.IndicatorCurrent = topTask.IndicatorMaximum;
|
||||
|
||||
TaskController.UpdateTask(topTask);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -490,8 +492,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
string backupFileName = (storePackageId > 0)
|
||||
? Path.GetFileName(storePackageBackupPath) : Path.GetFileName(storeServerBackupPath);
|
||||
|
||||
TaskManager.StartTask(taskId, "BACKUP", "RESTORE", backupFileName);
|
||||
TaskManager.ItemId = SecurityContext.User.UserId;
|
||||
TaskManager.StartTask(taskId, "BACKUP", "RESTORE", backupFileName, SecurityContext.User.UserId);
|
||||
|
||||
// create temp folder
|
||||
string tempFolder = GetTempBackupFolder();
|
||||
|
|
|
@ -171,8 +171,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
PackageInfo package = PackageController.GetPackage(packageId);
|
||||
|
||||
TaskManager.StartTask(taskId, "IMPORT", "IMPORT", package.PackageName);
|
||||
TaskManager.ItemId = packageId;
|
||||
TaskManager.StartTask(taskId, "IMPORT", "IMPORT", package.PackageName, packageId);
|
||||
|
||||
TaskManager.IndicatorMaximum = items.Length;
|
||||
TaskManager.IndicatorCurrent = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue