alan5281 / pubsubhubbub

Automatically exported from code.google.com/p/pubsubhubbub
Other
0 stars 0 forks source link

lease_seconds barfing on unicode string #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Traceback (most recent call last):
  File 
"/base/python_lib/versions/1/google/appengine/ext/webapp/__init_
_.py", line 509, in __call__
    handler.post(*groups)
  File "/base/data/home/apps/pubsubhubbub/tons-o-
stats.340239394873673256/main.py", line 2884, in post
    handler.post()
  File "/base/data/home/apps/pubsubhubbub/tons-o-
stats.340239394873673256/dos.py", line 169, in decorated
    return func(myself, *args, **kwargs)
  File "/base/data/home/apps/pubsubhubbub/tons-o-
stats.340239394873673256/main.py", line 1980, in post
    lease_seconds=lease_seconds)
  File "/base/data/home/apps/pubsubhubbub/tons-o-
stats.340239394873673256/main.py", line 856, in request_insert
    new, sub = db.run_in_transaction(txn)
  File 
"/base/python_lib/versions/1/google/appengine/api/datastore.py&q
uot;, line 2075, in RunInTransaction
    DEFAULT_TRANSACTION_RETRIES, function, *args, **kwargs)
  File 
"/base/python_lib/versions/1/google/appengine/api/datastore.py&q
uot;, line 2166, in RunInTransactionCustomRetries
    result = function(*args, **kwargs)
  File "/base/data/home/apps/pubsubhubbub/tons-o-
stats.340239394873673256/main.py", line 852, in txn
    now() + datetime.timedelta(seconds=lease_seconds)))
TypeError: unsupported type for timedelta seconds component: unicode

Original issue reported on code.google.com by bslatkin on 4 Mar 2010 at 7:34

GoogleCodeExporter commented 9 years ago
Hub fails on "&hub.lease_seconds="

Hub works with "&hub.lease_seconds=0" but returns a lease time of 0 seconds

Original comment by jrossi...@gmail.com on 8 Mar 2010 at 6:56

GoogleCodeExporter commented 9 years ago
I know its not correct and I don't know the ramifications, but if you're really 
lame with 
python and really impatient, like me, change the 2 uses of lease_seconds around 
line 850 
in main.py:

int(2592000)

and it will work and you can test if your hub is working. 

lease_seconds appears to trace back to a constant declared at the top that 
nobody will 
change anyway, so its probably good to go..

Original comment by luvfil...@gmail.com on 6 Apr 2010 at 3:50

GoogleCodeExporter commented 9 years ago
Fixed in r360

Original comment by bslatkin on 3 Jun 2010 at 11:00