diff options
-rw-r--r-- | lib/MaildirIndexer/LogTimelineSchema.rakumod | 2 | ||||
-rw-r--r-- | lib/MaildirIndexer/Store.rakumod | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/MaildirIndexer/LogTimelineSchema.rakumod b/lib/MaildirIndexer/LogTimelineSchema.rakumod index 1e1848f..ea0d2fc 100644 --- a/lib/MaildirIndexer/LogTimelineSchema.rakumod +++ b/lib/MaildirIndexer/LogTimelineSchema.rakumod @@ -2,6 +2,8 @@ use v6.d; unit module MaildirIndexer::LogTimelineSchema; use Log::Timeline; +class Scan::End does Log::Timeline::Event['MaildirIndexer','ScanDir','end of initial scan'] { }; + class Store::Add does Log::Timeline::Task['MaildirIndexer','Store','add file'] { }; class Store::Rm does Log::Timeline::Task['MaildirIndexer','Store','rm file'] { }; class Store::Find does Log::Timeline::Task['MaildirIndexer','Store','finding mailbox'] { }; diff --git a/lib/MaildirIndexer/Store.rakumod b/lib/MaildirIndexer/Store.rakumod index 03492f7..2144ddf 100644 --- a/lib/MaildirIndexer/Store.rakumod +++ b/lib/MaildirIndexer/Store.rakumod @@ -22,6 +22,7 @@ method start(--> Nil) { CATCH { warn $_ }; whenever $.file-channel -> $file { when $file ~~ MaildirIndexer::ScanDir::End { + MaildirIndexer::LogTimelineSchema::Scan::End.log(); } when $file ~~ :e & :f { MaildirIndexer::LogTimelineSchema::Store::Add.log: :file($file.path), -> { |