Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
bd002642
Commit
bd002642
authored
Oct 18, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标签ctr的默认值
parent
0979f1c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
collect_data.py
linucb/views/collect_data.py
+3
-3
No files found.
linucb/views/collect_data.py
View file @
bd002642
...
...
@@ -236,15 +236,15 @@ class CollectData(object):
device_tag_ctr
=
LikeDeviceTagStat
.
objects
.
using
(
settings
.
SLAVE1_DB_NAME
)
.
filter
(
device_id
=
device_id
,
tag_id
=
tag_id
)
.
values
(
"tag_ctr_30"
)
if
device_tag_ctr
:
device_tag_ctr_value
=
device_tag_ctr
[
0
]
.
get
(
"tag_ctr_30"
,
0
.0
)
device_tag_ctr_value
=
device_tag_ctr
[
0
]
.
get
(
"tag_ctr_30"
,
1
.0
)
else
:
device_tag_ctr_value
=
0
.0
device_tag_ctr_value
=
1
.0
logging
.
info
(
"get_device_tag_ctr"
+
str
(
device_id
)
+
str
(
tag_id
))
return
device_tag_ctr_value
except
:
logging_exception
()
logging
.
error
(
"get_device_tag_ctr error!"
)
return
0
.0
return
1
.0
def
consume_data_from_kafka
(
self
,
topic_name
=
None
):
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment