[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Expiring old mails in kmail/kontact
From:       David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date:       2004-05-09 11:39:47
Message-ID: 200405091339.47762.dfaure () klaralvdalens-datakonsult ! se
[Download RAW message or body]

On Friday 07 May 2004 21:13, Ingo Klöcker wrote:
> As soon as the folder that's currently being expired is touched by 
> another operation the expiration job should be aborted (and another one 
> should be scheduled, cf. below). 
OK (how best to hook into "any operation that touches a folder"? Does everything
end up using FolderJobs?)

> The currently selected folder should  
> never be expired (because it would be very confusing for the user if 
> the currently selected message all of a sudden disappears).
Makes sense, but there's always a case that breaks then: a user with
only one inbox, no other folders... The inbox is always selected -> it is
never expired.
I don't see any other solutions than allowing to expire the selected folder,
or executing the held "expire folder" task when exiting kmail since it couldn't
be executed before in this special case.

> We need something like a job scheduler/queue in the kernel. This 
> scheduler should expire all to-be-expired folders every 2 hours or so. 
> One after the other, of course. The first expiration cycle should start 
> shortly after the start of KMail so that folders are also expired for 
> users who don't keep KMail open for several hours.
OK I have started coding this: a JobScheduler single instance owned
by kmkernel, with a list of ScheduledTask instances. Each scheduledtask
knows which folder it's about, and is a base class, with 
virtual FolderJob* run() = 0;
ExpireJob is a new FolderJob subclass which implements timer-based
chunk-by-chunk expiring for a given folder; ScheduledExpireTask is the
ScheduledTask reimplementation that creates an ExpireJob.
The only two issues I have are the two questions above.

-- 
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic