-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
111 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/FacadeCompanyName.FacadeProjectName.DomainService/BackgroundWorkers/ClearLoggerWorker.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Abp.Dependency; | ||
using Abp.Threading.Timers; | ||
using Abp.Timing; | ||
using FacadeCompanyName.FacadeProjectName.DomainService.Share; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FacadeCompanyName.FacadeProjectName.DomainService.BackgroundWorkers | ||
{ | ||
public class ClearLoggerWorker: FacadeProjectNameBackgroundWorkerBase, ISingletonDependency | ||
{ | ||
private readonly IFacadeConfiguration _facadeConfiguration; | ||
public ClearLoggerWorker(AbpAsyncTimer timer, IFacadeConfiguration facadeConfiguration) | ||
: base(timer) | ||
{ | ||
timer.Period = 1000 * 60 * 60; | ||
_facadeConfiguration = facadeConfiguration; | ||
} | ||
protected override async Task DoWorkAsync() | ||
{ | ||
var rootPath = _facadeConfiguration.AppRootPath; | ||
var logsPath = Path.Combine(rootPath, "App_Data", "Logs"); | ||
if (Directory.Exists(logsPath)) | ||
{ | ||
var lastMonth = Clock.Now.Subtract(TimeSpan.FromDays(90)); | ||
var path1 = Path.Combine(logsPath, lastMonth.ToString("yyyy"), lastMonth.ToString("MM")); | ||
if (Directory.Exists(path1)) | ||
{ | ||
Directory.Delete(path1, true); | ||
} | ||
} | ||
await Task.CompletedTask; | ||
} | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
src/FacadeCompanyName.FacadeProjectName.DomainService/BackgroundWorkers/DemoWorker.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/FacadeCompanyName.FacadeProjectName.DomainService/Schedules/ScheduleJobBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...acadeCompanyName.FacadeProjectName.Tests/FacadeCompanyName.FacadeProjectName.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters