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
a588d1c0
Commit
a588d1c0
authored
Apr 24, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
a583592c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
tasks.py
injection/data_sync/tasks.py
+18
-18
No files found.
injection/data_sync/tasks.py
View file @
a588d1c0
...
...
@@ -25,24 +25,25 @@ exec_count = 0
@shared_task
def
write_to_es
(
es_type
,
pk_list
,
use_batch_query_set
=
False
):
try
:
pk_list
=
list
(
frozenset
(
pk_list
))
if
es_type
==
"register_user_tag"
:
RegisterUserTag
.
get_register_user_tag
(
pk_list
)
elif
es_type
==
"attention_user_tag"
:
RegisterUserTag
.
get_user_attention_tag
(
pk_list
)
else
:
type_info_map
=
get_type_info_map
()
type_info
=
type_info_map
[
es_type
]
logging
.
info
(
"consume es_type:
%
s"
%
str
(
es_type
))
type_info
.
insert_table_by_pk_list
(
sub_index_name
=
es_type
,
pk_list
=
pk_list
,
use_batch_query_set
=
use_batch_query_set
,
es
=
ESPerform
.
get_cli
()
)
#
pk_list = list(frozenset(pk_list))
#
#
if es_type == "register_user_tag":
#
RegisterUserTag.get_register_user_tag(pk_list)
#
elif es_type == "attention_user_tag":
#
RegisterUserTag.get_user_attention_tag(pk_list)
#
else:
#
type_info_map = get_type_info_map()
#
type_info = type_info_map[es_type]
#
#
logging.info("consume es_type:%s" % str(es_type))
#
type_info.insert_table_by_pk_list(
#
sub_index_name=es_type,
#
pk_list=pk_list,
#
use_batch_query_set=use_batch_query_set,
#
es=ESPerform.get_cli()
#
)
auto_click
(
pk_list
)
auto_reply
(
pk_list
)
except
:
...
...
@@ -180,7 +181,6 @@ def auto_reply(pk_list):
pc
.
close
()
if
topic_id_list
:
try
:
def
fun_comment
():
cookies
=
login
()
if
cookies
:
...
...
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