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
fb2d2cb6
Commit
fb2d2cb6
authored
6 years ago
by
Kai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of git.wanmeizhensuo.com:alpha/physical into test
parents
9e209339
1c03f85a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
Project.xml
.idea/codeStyles/Project.xml
+25
-0
tasks.py
majia/tasks.py
+3
-2
celery_task_router.py
physical/celery_task_router.py
+3
-3
No files found.
.idea/codeStyles/Project.xml
View file @
fb2d2cb6
...
@@ -24,5 +24,29 @@
...
@@ -24,5 +24,29 @@
<option
name=
"ITERATION_ELEMENTS_WRAPPING"
value=
"chop_down_if_not_single"
/>
<option
name=
"ITERATION_ELEMENTS_WRAPPING"
value=
"chop_down_if_not_single"
/>
</formatting-settings>
</formatting-settings>
</DBN-SQL>
</DBN-SQL>
<DBN-PSQL>
<case-options
enabled=
"false"
>
<option
name=
"KEYWORD_CASE"
value=
"lower"
/>
<option
name=
"FUNCTION_CASE"
value=
"lower"
/>
<option
name=
"PARAMETER_CASE"
value=
"lower"
/>
<option
name=
"DATATYPE_CASE"
value=
"lower"
/>
<option
name=
"OBJECT_CASE"
value=
"preserve"
/>
</case-options>
<formatting-settings
enabled=
"false"
/>
</DBN-PSQL>
<DBN-SQL>
<case-options
enabled=
"false"
>
<option
name=
"KEYWORD_CASE"
value=
"lower"
/>
<option
name=
"FUNCTION_CASE"
value=
"lower"
/>
<option
name=
"PARAMETER_CASE"
value=
"lower"
/>
<option
name=
"DATATYPE_CASE"
value=
"lower"
/>
<option
name=
"OBJECT_CASE"
value=
"preserve"
/>
</case-options>
<formatting-settings
enabled=
"false"
>
<option
name=
"STATEMENT_SPACING"
value=
"one_line"
/>
<option
name=
"CLAUSE_CHOP_DOWN"
value=
"chop_down_if_statement_long"
/>
<option
name=
"ITERATION_ELEMENTS_WRAPPING"
value=
"chop_down_if_not_single"
/>
</formatting-settings>
</DBN-SQL>
</code_scheme>
</code_scheme>
</component>
</component>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
majia/tasks.py
View file @
fb2d2cb6
...
@@ -3,9 +3,9 @@ import traceback
...
@@ -3,9 +3,9 @@ import traceback
import
logging
import
logging
from
celery
import
shared_task
from
celery
import
shared_task
login_url
=
"http://earth.igengmei.com/api/account/login_pwd"
login_url
=
"http://earth.igengmei.com/api/account/login_pwd"
def
index_first
():
def
index_first
():
try
:
try
:
r1
=
requests
.
get
(
login_url
)
r1
=
requests
.
get
(
login_url
)
...
@@ -16,9 +16,10 @@ def index_first():
...
@@ -16,9 +16,10 @@ def index_first():
return
None
return
None
@shared_task
(
name
=
"majia.tasks.get_cook"
)
@shared_task
(
name
=
"majia.tasks.get_cook"
)
def
get_cook
():
def
get_cook
():
data
=
open
(
"srv/apps/physical/majia/majia_email.txt"
,
"r"
)
data
=
open
(
"srv/apps/physical/majia/majia_email.txt"
,
"r"
)
list
=
[]
list
=
[]
dicts
=
{}
dicts
=
{}
...
...
This diff is collapsed.
Click to expand it.
physical/celery_task_router.py
View file @
fb2d2cb6
...
@@ -4,20 +4,20 @@ from django.conf import settings
...
@@ -4,20 +4,20 @@ from django.conf import settings
import
itertools
import
itertools
import
logging
import
logging
class
CeleryTaskRouter
(
object
):
class
CeleryTaskRouter
(
object
):
queue_task_map
=
{
queue_task_map
=
{
"tapir-alpha"
:
[
"tapir-alpha"
:
[
'injection.data_sync.tasks.write_to_es'
,
'injection.data_sync.tasks.write_to_es'
,
],
],
"majia-alpha"
:
[
"majia-alpha"
:
[
'
injection.data_sync
.auto_instant_click.auto_click'
,
'
majia
.auto_instant_click.auto_click'
,
],
],
"majia-alpha"
:
[
"majia-alpha"
:
[
'
injection.data_sync
.auto_instant_click.auto_reply'
,
'
majia
.auto_instant_click.auto_reply'
,
]
]
}
}
# Map[TaskName, QueueName]
# Map[TaskName, QueueName]
task_queue_map
=
dict
(
itertools
.
chain
.
from_iterable
(
task_queue_map
=
dict
(
itertools
.
chain
.
from_iterable
(
[(
task
,
queue
)
for
task
in
task_list
]
[(
task
,
queue
)
for
task
in
task_list
]
...
...
This diff is collapsed.
Click to expand it.
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