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
钟尚武
physical
Commits
ef2eb65f
Commit
ef2eb65f
authored
Apr 18, 2019
by
Kai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
8c2407af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
collect_data.py
linucb/views/collect_data.py
+4
-4
No files found.
linucb/views/collect_data.py
View file @
ef2eb65f
...
...
@@ -164,8 +164,8 @@ class CollectData(object):
tag_list
=
list
()
click_topic_tag_list
=
list
()
collection_tag_sql_query_results
=
TopicTag
.
objects
.
using
(
settings
.
SLAVE_DB_NAME
)
.
filter
(
topic_id
=
topic_id
)
.
values_list
(
"tag_id"
,
"is_online"
,
"is_collection"
)
if
len
(
collection_tag_sql_query_results
)
>
0
:
for
tag_id
,
is_online
,
is_collection
in
collection_tag_sql_query_results
:
#
if len(collection_tag_sql_query_results)>0:
for
tag_id
,
is_online
,
is_collection
in
collection_tag_sql_query_results
:
if
is_online
and
is_collection
==
1
:
click_topic_tag_list
.
append
(
tag_id
)
...
...
@@ -217,8 +217,8 @@ class CollectData(object):
topic_tag_id_dict
=
dict
()
tag_list
=
list
()
exposure_sql_query_results
=
TopicTag
.
objects
.
using
(
settings
.
SLAVE_DB_NAME
)
.
filter
(
topic_id__in
=
exposure_topic_id_list
)
.
values_list
(
"topic_id"
,
"tag_id"
,
"is_online"
,
"is_collection"
)
if
len
(
exposure_sql_query_results
)
>
0
:
for
topic_id
,
tag_id
,
is_online
,
is_collection
in
exposure_sql_query_results
:
#
if len(exposure_sql_query_results)>0:
for
topic_id
,
tag_id
,
is_online
,
is_collection
in
exposure_sql_query_results
:
if
is_online
and
is_collection
==
1
:
tag_list
.
append
(
tag_id
)
if
is_online
:
...
...
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