Skip to content

Commit 24724bd

Browse files
author
Alvin Richards
committed
Remove unneeded code
1 parent e701360 commit 24724bd

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

aerospike/vote/dev/app.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,29 @@ def index():
5353

5454
key = ("test", "votes", voter_id)
5555

56-
data = {'vote': vote, 'ts': time_ms}
57-
58-
client.put(key, {"vote": vote, "ts": time_ms, 'voter_id': voter_id} )
59-
client.list_append(key, "history", data)
56+
operations = [
57+
{
58+
"op" : aerospike.OPERATOR_WRITE,
59+
"bin" : "vote",
60+
"val" : vote
61+
},
62+
{
63+
"op" : aerospike.OPERATOR_WRITE,
64+
"bin" : "ts",
65+
"val" : time_ms
66+
},
67+
{
68+
"op" : aerospike.OPERATOR_WRITE,
69+
"bin" : "voter_id",
70+
"val" : voter_id
71+
},
72+
{
73+
"op" : aerospike.OP_LIST_APPEND,
74+
"bin" : "history",
75+
"val" : {'vote': vote, 'ts': time_ms}
76+
}
77+
]
78+
client.operate(key, operations)
6079

6180
client.increment(("test", "summary", "total_votes"), "total", 1)
6281
client.increment(("test", "summary", host), "total", 1)

aerospike/vote/dev/utils/__init__.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)