Ok, here's a version of the script that seems to be working for me. (No
more 100% cpu.) It handles repeating events. So it will automatically
accept invites that don't conflict and decline ones that do. In the case
of repeating events, it does this very inefficiently. It looks for all
iterations of the event it is testing and compares it against all
iterations of all events from the time period between Jan 1st 2010 to
Jan 1 2012. So if you have two events that repeat 100 times in 2 years,
it does 100^2 calculations to see if they conflict. If you have 3 events
like this, then it is 2*100^100. Hackish but functional.

So, you can either call this script from a cron-job, or I'm going to try
to create a database trigger on update / insert into the relevant sogo
database table. 

Thanks again to Mohit for doing all the hard work with this script.

Ben


On Tue, 2011-03-08 at 22:16 -0700, Ben wrote:
> Thanks! That was it (or seems to be so far). Now I'll take a look at
> recurring events.
> 
> Ben
> 
> On Wed, 2011-03-09 at 10:01 +0530, Mohit Chawla wrote:
> > Hi,
> > 
> > On Wed, Mar 9, 2011 at 7:53 AM, Ben <[email protected]>
> > wrote:
> >         Anyway, I've attached both the ics file that I push to SOGo
> >         via HTTP-DAV
> >         and the newer version of my script if anyone wants to take a
> >         look (but
> >         be careful).
> > 
> > Use DECLINED instead of REJECTED. REJECTED is not a valid
> > participation status, or rather, it won't work as DECLINED. And a wild
> > guess - since my CPU usage also was hitting the roof with your script
> > - I think that ( participation status ) *might* be the issue. 
> > 
> 
> 

-- 
[email protected]
https://inverse.ca/sogo/lists

Attachment: Accept-ben.pl
Description: Perl program

Reply via email to