跳转到主要内容

Tarantool Python工具

项目描述

注意!此模块仅在tarantool 1.5上进行了测试。

到这个时候,celery后端还没有准备好。

目前只支持一个tarantool实例。

  • tarantool_utils.django.TarantoolCache

  • tarantool_utils.django.TarantoolSession (未准备就绪)

  • tarantool_utils.celery.TarantoolBackend

  • tarantool_utils.celery.TarantoolTransport (未准备就绪)

  • tarantool_utils.sentry.TarantoolBuffer

安装

将expirationd文件放入tarantool脚本目录。

tarantool.conf示例

# Django cache
space[0].enabled = 1
space[0].index[0].type = "HASH"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].fieldno = 0
space[0].index[0].key_field[0].type = "STR" # key
space[0].index[1].type = "TREE"
space[0].index[1].unique = 0
space[0].index[1].key_field[0].fieldno = 2
space[0].index[1].key_field[0].type = "NUM64" # timeout

# Sentry buffer
space[1].enabled = 1
space[1].index[0].type = "HASH"
space[1].index[0].unique = 1
space[1].index[0].key_field[0].fieldno = 0
space[1].index[0].key_field[0].type = "STR" # key
space[1].index[1].type = "TREE"
space[1].index[1].unique = 0
space[1].index[1].key_field[0].fieldno = 2
space[1].index[1].key_field[0].type = "NUM64" # timeout

space[2].enabled = 1
space[2].index[0].type = "HASH"
space[2].index[0].unique = 1
space[2].index[0].key_field[0].fieldno = 0
space[2].index[0].key_field[0].type = "STR" # key
space[2].index[0].key_field[1].fieldno = 1
space[2].index[0].key_field[1].type = "STR" # column
space[2].index[1].type = "TREE"
space[2].index[1].unique = 0
space[2].index[1].key_field[0].fieldno = 0
space[2].index[1].key_field[0].type = "STR" # key
space[2].index[2].type = "TREE"
space[2].index[2].unique = 0
space[2].index[2].key_field[0].fieldno = 3
space[2].index[2].key_field[0].type = "NUM64" # timeout

# Celery backend
space[3].enabled = 1
space[3].index[0].type = "HASH"
space[3].index[0].unique = 1
space[3].index[0].key_field[0].fieldno = 0
space[3].index[0].key_field[0].type = "STR" # key
space[3].index[1].type = "TREE"
space[3].index[1].unique = 0
space[3].index[1].key_field[0].fieldno = 2
space[3].index[1].key_field[0].type = "NUM64" # timeout

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码发行版

tarantool-utils-0.1.5.tar.gz (6.4 kB 查看哈希值)

上传时间: 源代码

由以下支持