WeddingPlatform.Web 1.0.0.0
지도, 갤러리, 방명록, 계좌 안내와 배경음악을 링크 하나에 담는 무료 모바일 청첩장 서비스입니다.
로딩중...
검색중...
일치하는것 없음
WeddingPlatform.Services.GhostAccountCleanupService 클래스 참조sealed

더 자세히 ...

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

Public 멤버 함수

 GhostAccountCleanupService (ITenantStore tenants, ILogger< GhostAccountCleanupService > logger)

Protected 멤버 함수

override async Task ExecuteAsync (CancellationToken stoppingToken)

Private 멤버 함수

async Task RunCleanupAsync (CancellationToken ct)

Private 속성

readonly ITenantStore _tenants
readonly ILogger< GhostAccountCleanupService_logger

정적 Private 속성

static readonly TimeSpan Interval = TimeSpan.FromHours(1)
static readonly TimeSpan GracePeriod = TimeSpan.FromHours(24)

상세한 설명

사진 없이 24시간 이상 방치된 계정을 자동 삭제합니다.

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

생성자 & 소멸자 문서화

◆ GhostAccountCleanupService()

WeddingPlatform.Services.GhostAccountCleanupService.GhostAccountCleanupService ( ITenantStore tenants,
ILogger< GhostAccountCleanupService > logger )
inline

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

매개변수
tenantstenants에 사용할 ITenantStore 값입니다.
loggerlogger에 사용할 ILogger<GhostAccountCleanupService> 값입니다.

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

78 {
79 _tenants = tenants;
80 _logger = logger;
81 }

다음을 참조함 : _logger, _tenants.

멤버 함수 문서화

◆ ExecuteAsync()

override async Task WeddingPlatform.Services.GhostAccountCleanupService.ExecuteAsync ( CancellationToken stoppingToken)
inlineprotected

Execute Async 작업을 수행합니다.

매개변수
stoppingTokenstopping Token에 사용할 CancellationToken 값입니다.
반환값
Execute Async 작업에서 생성한 Task 결과입니다.

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

108 {
109 while (!stoppingToken.IsCancellationRequested)
110 {
111 await Task.Delay(Interval, stoppingToken).ConfigureAwait(false);
112 await RunCleanupAsync(stoppingToken).ConfigureAwait(false);
113 }
114 }

다음을 참조함 : Interval, RunCleanupAsync().

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

◆ RunCleanupAsync()

async Task WeddingPlatform.Services.GhostAccountCleanupService.RunCleanupAsync ( CancellationToken ct)
inlineprivate

Run Cleanup Async 작업을 수행합니다.

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

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

141 {
142 try
143 {
144 var all = await _tenants.GetAllAsync(ct).ConfigureAwait(false);
145 var cutoff = DateTime.Now - GracePeriod;
146
147 foreach (var t in all)
148 {
149 if (t.GalleryFileNames.Count > 0) continue;
150 if (t.CreatedAt > cutoff) continue;
151
152 await _tenants.DeleteAsync(t.Slug, ct).ConfigureAwait(false);
153 _logger.LogInformation("고스트 계정 자동 삭제: {Slug} (생성: {CreatedAt:g}, 사진 0장)", t.Slug, t.CreatedAt);
154 }
155 }
156 catch (Exception ex) when (ex is not OperationCanceledException)
157 {
158 _logger.LogError(ex, "고스트 계정 정리 중 오류 발생");
159 }
160 }

다음을 참조함 : _logger, _tenants, GracePeriod.

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

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

멤버 데이터 문서화

◆ _logger

readonly ILogger<GhostAccountCleanupService> WeddingPlatform.Services.GhostAccountCleanupService._logger
private

logger 값을 보관합니다.

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

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

◆ _tenants

readonly ITenantStore WeddingPlatform.Services.GhostAccountCleanupService._tenants
private

tenants 값을 보관합니다.

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

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

◆ GracePeriod

readonly TimeSpan WeddingPlatform.Services.GhostAccountCleanupService.GracePeriod = TimeSpan.FromHours(24)
staticprivate

Grace Period 값을 보관합니다.

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

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

◆ Interval

readonly TimeSpan WeddingPlatform.Services.GhostAccountCleanupService.Interval = TimeSpan.FromHours(1)
staticprivate

Interval 값을 보관합니다.

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

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


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