Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tarantool/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ def sha1(values):
request_body = msgpack.dumps({IPROTO_USER_NAME: user,
IPROTO_TUPLE: ("chap-sha1", scramble)})
self._body = request_body

def header(self, length):
self._sync = self.conn.generate_sync()
# Set IPROTO_SCHEMA_ID: 0 to avoid SchemaReloadException
# It is ok to use 0 in auth every time
header = msgpack.dumps({IPROTO_CODE: self.request_type,
IPROTO_SYNC: self._sync,
IPROTO_SCHEMA_ID: 0})

return msgpack.dumps(length + len(header)) + header


class RequestReplace(Request):
Expand Down