Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
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
rank
search_tips
Commits
be937165
Commit
be937165
authored
Jul 04, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
e6ef460d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
aaa.py
aaa.py
+2
-2
celerybeat.pid
celerybeat.pid
+1
-1
tasks.py
injection/data_sync/tasks.py
+2
-1
celery_task_router.py
search_tips/celery_task_router.py
+1
-0
No files found.
aaa.py
View file @
be937165
from
injection.data_sync.tasks
import
write_to_es
result
=
write_to_es
.
delay
(
'associate_tag'
,
[
1
323
],
False
)
result
=
write_to_es
.
delay
(
'associate_tag'
,
[
1
],
False
)
print
(
result
.
read
()
)
print
(
result
)
celerybeat.pid
View file @
be937165
2
4892
2
9010
injection/data_sync/tasks.py
View file @
be937165
...
...
@@ -18,6 +18,7 @@ from libs.cache import redis_client
@shared_task
def
write_to_es
(
es_type
,
pk_list
,
use_batch_query_set
=
False
):
logging
.
info
(
"get -----------------"
)
logging
.
info
(
"consume es_type:
%
s"
%
str
(
es_type
))
try
:
...
...
@@ -47,4 +48,4 @@ def write_to_es(es_type, pk_list, use_batch_query_set=False):
)
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
git
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
search_tips/celery_task_router.py
View file @
be937165
...
...
@@ -30,4 +30,5 @@ class CeleryTaskRouter(object):
"""
queue_name_or_none
=
self
.
task_queue_map
.
get
(
task
)
logging
.
info
(
"task_queue_map:
%
s"
%
queue_name_or_none
)
return
queue_name_or_none
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