Portfolio.Web 1.0.0.0
.NET, Blazor, WPF와 서비스 운영 경험을 프로젝트·이력·기술 스택 단위로 보여주는 개발자 포트폴리오입니다.
로딩중...
검색중...
일치하는것 없음
PortfolioApp.Services.GhostAccountCleanupService 클래스 참조

더 자세히 ...

PortfolioApp.Services.GhostAccountCleanupService에 대한 상속 다이어그램 :
PortfolioApp.Services.GhostAccountCleanupService에 대한 협력 다이어그램:

Public 멤버 함수

 GhostAccountCleanupService (IPortfolioTenantStore tenants, IProjectStore projects, ILogger< GhostAccountCleanupService > log)

Protected 멤버 함수

override async Task ExecuteAsync (CancellationToken ct)

Private 멤버 함수

async Task CleanupAsync ()

Private 속성

readonly IPortfolioTenantStore _tenants
readonly IProjectStore _projects
readonly ILogger< GhostAccountCleanupService_log

상세한 설명

Ghost Account Cleanup Service 기능과 관련 상태를 캡슐화합니다.

GhostAccountCleanupService.cs 파일의 14 번째 라인에서 정의되었습니다.

생성자 & 소멸자 문서화

◆ GhostAccountCleanupService()

PortfolioApp.Services.GhostAccountCleanupService.GhostAccountCleanupService ( IPortfolioTenantStore tenants,
IProjectStore projects,
ILogger< GhostAccountCleanupService > log )
inline

지정한 설정으로 GhostAccountCleanupService 클래스의 새 인스턴스를 초기화합니다.

매개변수
tenantstenants에 사용할 IPortfolioTenantStore 값입니다.
projectsprojects에 사용할 IProjectStore 값입니다.
loglog에 사용할 ILogger<GhostAccountCleanupService> 값입니다.

GhostAccountCleanupService.cs 파일의 76 번째 라인에서 정의되었습니다.

80 {
81 _tenants = tenants;
82 _projects = projects;
83 _log = log;
84 }

다음을 참조함 : _log, _projects, _tenants.

멤버 함수 문서화

◆ CleanupAsync()

async Task PortfolioApp.Services.GhostAccountCleanupService.CleanupAsync ( )
inlineprivate

Cleanup Async 작업을 수행합니다.

반환값
Cleanup Async 작업에서 생성한 Task 결과입니다.

GhostAccountCleanupService.cs 파일의 135 번째 라인에서 정의되었습니다.

136 {
137 var all = await _tenants.GetAllAsync();
138 var cutoff = DateTime.Now.AddHours(-24);
139 foreach (var cfg in all)
140 {
141 if (cfg.CreatedAt > cutoff) continue;
142 var projects = await _projects.GetAllAsync(cfg.Slug);
143 if (projects.Count == 0)
144 {
145 await _tenants.DeleteAsync(cfg.Slug);
146 _log.LogInformation("Ghost account deleted: {Slug}", cfg.Slug);
147 }
148 }
149 }

다음을 참조함 : _log, _projects, _tenants.

다음에 의해서 참조됨 : ExecuteAsync().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ExecuteAsync()

override async Task PortfolioApp.Services.GhostAccountCleanupService.ExecuteAsync ( CancellationToken ct)
inlineprotected

Execute Async 작업을 수행합니다.

매개변수
ct취소 요청을 감시하는 토큰입니다.
반환값
Execute Async 작업에서 생성한 Task 결과입니다.

GhostAccountCleanupService.cs 파일의 110 번째 라인에서 정의되었습니다.

111 {
112 while (!ct.IsCancellationRequested)
113 {
114 await Task.Delay(TimeSpan.FromHours(1), ct);
115 try { await CleanupAsync(); } catch (Exception ex) { _log.LogError(ex, "Cleanup error"); }
116 }
117 }

다음을 참조함 : _log, CleanupAsync().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ _log

readonly ILogger<GhostAccountCleanupService> PortfolioApp.Services.GhostAccountCleanupService._log
private

log 값을 보관합니다.

GhostAccountCleanupService.cs 파일의 42 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : CleanupAsync(), ExecuteAsync(), GhostAccountCleanupService().

◆ _projects

readonly IProjectStore PortfolioApp.Services.GhostAccountCleanupService._projects
private

projects 값을 보관합니다.

GhostAccountCleanupService.cs 파일의 33 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : CleanupAsync(), GhostAccountCleanupService().

◆ _tenants

readonly IPortfolioTenantStore PortfolioApp.Services.GhostAccountCleanupService._tenants
private

tenants 값을 보관합니다.

GhostAccountCleanupService.cs 파일의 24 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : CleanupAsync(), GhostAccountCleanupService().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: