change onchanged to take doc and newdata
This commit is contained in:
parent
cedc71bf64
commit
cab149e241
@ -178,7 +178,7 @@ class Kernel(object):
|
||||
})
|
||||
# fire off onchanged functions
|
||||
for onchanged in doc_class['onchanged']:
|
||||
onchanged(doc)
|
||||
onchanged(doc, newdata)
|
||||
|
||||
if error:
|
||||
# if there's been an error, increment the consecutive_errors count
|
||||
|
@ -7,7 +7,7 @@ import pymongo
|
||||
|
||||
from oyster.core import Kernel
|
||||
|
||||
def hook_fired(doc):
|
||||
def hook_fired(doc, newdata):
|
||||
doc['hook_fired'] = doc.get('hook_fired', 0) + 1
|
||||
|
||||
RANDOM_URL = 'http://www.random.org/integers/?num=1&min=-1000000000&max=1000000000&col=1&base=10&format=plain&rnd=new'
|
||||
|
Loading…
Reference in New Issue
Block a user