1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-18 14:47:03 +00:00

queue: Implement persistency

This patch makes the queue read and write items to disk.

It uses protobuf for serialization. We serialize to text format to make
manual troubleshooting easier, as the performance difference is not very
relevant for us.
This commit is contained in:
Alberto Bertogli
2016-09-18 06:13:42 +01:00
parent 9ed30a747b
commit aacf8ffea7
11 changed files with 457 additions and 64 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e
. $(dirname ${0})/../util/lib.sh
init
# Add an item to the queue before starting chasquid.
go run addtoqueue.go --queue_dir=.data/queue \
--from someone@testserver \
--rcpt someone@testserver \
< content
generate_certs_for testserver
mkdir -p .logs
chasquid -v=2 --log_dir=.logs --config_dir=config &
wait_until_ready 1025
# Check that the item in the queue was delivered.
wait_for_file .mail/someone@testserver
mail_diff content .mail/someone@testserver
success