Esempio n. 1
0
 def __init__(self, request):
     self.user_agent = request.headers.get('User-Agent')
     self.remote_addr = request.remote_addr
     self.firstactivity = datetime.now()
     self.lastactivity = None
     self.update()
     dbsession.add(self)
     dbsession.flush()
Esempio n. 2
0
def doit(input, output):
    try:
        function, hContext, inparams = input
        hresult, outparams = output
        opclass = operation.getclassfor(function)
        op = opclass(function, hContext, **inparams)
        op.performed(hresult, **outparams)
        dbsession.add(op)
    finally:
        dbsession.flush()
        dbsession.remove()
Esempio n. 3
0
 def __init__(self, session, value, implementation):
     self.session_uid = session.uid
     self.value = value
     dbsession.add(self)
     dbsession.flush()
Esempio n. 4
0
 def __init__(self, value, context):
     self.value = value
     self.context_uid = context.uid
     context.handles.append(self)
     dbsession.add(self)
     dbsession.flush()