资源简介
不可描述的源代码,你懂得,想学习golang编程经验的有福了
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2017-12-25 下午2:43
# @Author : Hedan (hedan@bilibili.com)
# @file : databusTest
import json
import redis
# [databus]
# key = “4ba46ba31f9a44ef“
# secret = “99985eb4451cfb1b899ca0fbe3c4bdc8“
# group = “AccountLog-MainAccount-P“
# topic = “AccountLog-T“
# action = “pub“
# name = “member-service/databus“
# proto = “tcp“
# addr = “172.16.33.158:6205“
# idle = 100
# active = 100
# dialTimeout = “1s“
# readTimeout = “60s“
# writeTimeout = “1s“
# idleTimeout = “10s“
“““参考文档 http://info.bilibili.co/pages/viewpage.action?pageId=3670491
key 服务配置中databus的key
value 服务配置中databus的value
host和port 配置服务中databus的host和port
group-topic 一个group对应一个topic(开发申请)
“““
#每日登录 passport 获得5经验值
# data_passport ={
# ‘mid‘:4780461
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@PassportLog-MainAccount-P/topic=PassportLog-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日登录 account 获得5经验值
# data_passport ={
# ‘mid‘:110000092
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountLoginAward-MainAccount-P/topic=AccountLoginAward-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日首次分享视频 archive 获得5经验值
# data_archive ={
# ‘event‘:“share“
# ‘mid‘:110000092
# ‘ip‘:“127.0.0.1“
# “ts“:111
# }
# auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_archive)
# msg = json.dumps(data_archive ensure_ascii=False)
# rc.set(“1023“ msg)
#
#
# 每日首次分享视频 archive 获得5经验值
data_archive ={
‘event‘:“view“
# ‘mid‘:110000092
‘mid‘:4780461
‘ip‘:“127.0.0.1“
“ts“:1521745000
}
auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
print rc.execute_command(‘auth‘auth_archive)
msg = json.dumps(data_archive ensure_ascii=False)
rc.set(“1023“ msg)
# 每日首次观看 history 获得5经验值
# data_history ={
# “action“:“insert“
# “table“:“aso_account“
# “data“:{“mid“:110000193
# “userid“:“test_dan06“
# “uname“:“test_dan08“
# “pwd“:“6cfb
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-22 16:43 go-common\
文件 1310 2019-04-22 16:27 go-common\.bazelrc
文件 927 2019-04-22 16:27 go-common\.generated_files
目录 0 2019-04-22 17:42 go-common\.git\
文件 441 2019-04-22 16:27 go-common\.gitignore
目录 0 2019-04-22 16:27 go-common\.gitlab\
文件 1042 2019-04-22 16:27 go-common\.gitlab-ci.yml
目录 0 2019-04-22 16:27 go-common\.gitlab\issue_templates\
文件 494 2019-04-22 16:27 go-common\.gitlab\issue_templates\Bug.md
文件 359 2019-04-22 16:27 go-common\.gitlab\issue_templates\Doc.md
文件 321 2019-04-22 16:27 go-common\.gitlab\issue_templates\Feature.md
文件 318 2019-04-22 16:27 go-common\.gitlab\issue_templates\Refactor.md
文件 398 2019-04-22 16:27 go-common\.gitlab\issue_templates\Suggestion.md
目录 0 2019-04-22 16:27 go-common\.gitlab\merge_request_templates\
文件 382 2019-04-22 16:27 go-common\.gitlab\merge_request_templates\Common.md
文件 312 2019-04-22 16:27 go-common\.git\config
文件 73 2019-04-22 16:18 go-common\.git\desc
文件 107 2019-04-22 16:31 go-common\.git\FETCH_HEAD
文件 23 2019-04-22 16:27 go-common\.git\HEAD
目录 0 2019-04-22 16:18 go-common\.git\hooks\
文件 478 2019-04-22 16:18 go-common\.git\hooks\applypatch-msg.sample
文件 896 2019-04-22 16:18 go-common\.git\hooks\commit-msg.sample
文件 3327 2019-04-22 16:18 go-common\.git\hooks\fsmonitor-watchman.sample
文件 189 2019-04-22 16:18 go-common\.git\hooks\post-update.sample
文件 424 2019-04-22 16:18 go-common\.git\hooks\pre-applypatch.sample
文件 1642 2019-04-22 16:18 go-common\.git\hooks\pre-commit.sample
文件 1348 2019-04-22 16:18 go-common\.git\hooks\pre-push.sample
文件 4898 2019-04-22 16:18 go-common\.git\hooks\pre-reba
文件 544 2019-04-22 16:18 go-common\.git\hooks\pre-receive.sample
文件 1492 2019-04-22 16:18 go-common\.git\hooks\prepare-commit-msg.sample
文件 3610 2019-04-22 16:18 go-common\.git\hooks\update.sample
............此处省略30676个文件信息
- 上一篇:st的FOC 5.0开源库
- 下一篇:自己设计制作CPU与单片机
评论
共有 条评论