summaryrefslogtreecommitdiff
path: root/lib/MaildirIndexer/Server.pm6
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MaildirIndexer/Server.pm6')
-rw-r--r--lib/MaildirIndexer/Server.pm611
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/MaildirIndexer/Server.pm6 b/lib/MaildirIndexer/Server.pm6
index 53f4ba9..0172cf8 100644
--- a/lib/MaildirIndexer/Server.pm6
+++ b/lib/MaildirIndexer/Server.pm6
@@ -1,5 +1,6 @@
use v6.d;
unit class MaildirIndexer::Server;
+use MaildirIndexer::LogTimelineSchema;
use MaildirIndexer::Parser;
use MaildirIndexer::Store;
@@ -19,10 +20,12 @@ method serve() {
$.store.dump();
}
whenever $listener -> $conn {
- LEAVE { $conn.close }
- with parse-email($conn) -> $email {
- with $.store.mailbox-for-email($email) -> $mailbox {
- await $conn.print("$mailbox\x0d\x0a");
+ MaildirIndexer::LogTimelineSchema::Server::Serve.log: {
+ LEAVE { $conn.close }
+ with parse-email($conn) -> $email {
+ with $.store.mailbox-for-email($email) -> $mailbox {
+ await $conn.print("$mailbox\x0d\x0a");
+ }
}
}
}