Changes on server

- bugfixes in gcal callback
- requirements txt
This commit is contained in:
Martin Bauer
2014-04-21 09:21:59 +02:00
parent aac687c0c7
commit 46b4078fac
9 changed files with 84 additions and 56 deletions

View File

@@ -282,10 +282,10 @@ def checkGCalSubscription():
global service
callbackUrl = settings.GCAL_COUPLING['push_url']
#timeToLive = 14*24*3600 # how long the channel should be active
#renewBeforeExpiry = 2*24*3600 # duration before expiry when channel is renewed
timeToLive = 60*5
renewBeforeExpiry = 60*3
timeToLive = 14*24*3600 # how long the channel should be active
renewBeforeExpiry = 2*24*3600 # duration before expiry when channel is renewed
#timeToLive = 60*5
#renewBeforeExpiry = 60*3
# Test if a channel already exists for this callbackURL
try:
@@ -318,4 +318,4 @@ def checkGCalSubscription():
def stopAllGCalSubscriptions():
for dbChannel in GCalPushChannel.objects.all():
print("Stopping %s expiry at %d " % ( dbChannel.id, dbChannel.expiration ) )
GCalPushChannel.stop( service, dbChannel.toGChannel() )
GCalPushChannel.stop( service, dbChannel.toGChannel() )