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
d33a5c29
Commit
d33a5c29
authored
Apr 20, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
552ed6c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
tasks.py
injection/data_sync/tasks.py
+3
-4
test.py
majia/test.py
+1
-2
celery_task_router.py
physical/celery_task_router.py
+4
-7
No files found.
injection/data_sync/tasks.py
View file @
d33a5c29
# -*- coding: UTF-8 -*-
import
logging
import
traceback
import
json
from
celery
import
shared_task
from
django.conf
import
settings
from
django.core
import
serializers
from
trans2es.type_info
import
get_type_info_map
# from rpc.all import get_rpc_remote_invoker
from
libs.es
import
ESPerform
import
logging
import
traceback
from
libs.cache
import
redis_client
from
trans2es.models.face_user_contrast_similar
import
FaceUserContrastSimilar
,
UserSimilarScore
import
json
from
linucb.utils.register_user_tag
import
RegisterUserTag
@shared_task
...
...
majia/test.py
View file @
d33a5c29
...
...
@@ -6,7 +6,6 @@ from celery import shared_task
login_url
=
"http://earth.igengmei.com/api/account/login_pwd"
def
index_first
():
try
:
r1
=
requests
.
get
(
login_url
)
...
...
@@ -19,7 +18,7 @@ def index_first():
@shared_task
def
get_cook
():
data
=
open
(
"majia_email"
)
data
=
open
(
"majia_email"
,
"r"
)
list
=
[]
dicts
=
{}
...
...
physical/celery_task_router.py
View file @
d33a5c29
# coding=utf-8
from
__future__
import
unicode_literals
,
print_function
,
absolute_import
import
itertools
from
django.conf
import
settings
import
itertools
import
logging
class
CeleryTaskRouter
(
object
):
queue_task_map
=
{
#
"tapir-alpha": [
#
'injection.data_sync.tasks.write_to_es',
#
],
"tapir-alpha"
:
[
'injection.data_sync.tasks.write_to_es'
,
],
# "majia-alpha": [
# 'injection.data_sync.auto_instant_click.auto_click',
# ],
...
...
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