summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2019-12-29 18:48:42 +0000
committerdakkar <dakkar@thenautilus.net>2019-12-29 18:48:42 +0000
commitac9e15e812f90bdba750ff1948c93eea7991cdb5 (patch)
treea56030eda4421483f12de11a4466f897a060cfde
parenthandle receiving same file more than once (diff)
downloadMaildirIndexer-ac9e15e812f90bdba750ff1948c93eea7991cdb5.tar.gz
MaildirIndexer-ac9e15e812f90bdba750ff1948c93eea7991cdb5.tar.bz2
MaildirIndexer-ac9e15e812f90bdba750ff1948c93eea7991cdb5.zip
log end-of-scan
-rw-r--r--lib/MaildirIndexer/LogTimelineSchema.rakumod2
-rw-r--r--lib/MaildirIndexer/Store.rakumod1
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), -> {