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
b14bafa0
Commit
b14bafa0
authored
Apr 22, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
092aa75a
Hide 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 @
b14bafa0
...
...
@@ -24,5 +24,29 @@
<option
name=
"ITERATION_ELEMENTS_WRAPPING"
value=
"chop_down_if_not_single"
/>
</formatting-settings>
</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>
</component>
\ No newline at end of file
majia/tasks.py
View file @
b14bafa0
...
...
@@ -3,9 +3,9 @@ import traceback
import
logging
from
celery
import
shared_task
login_url
=
"http://earth.igengmei.com/api/account/login_pwd"
def
index_first
():
try
:
r1
=
requests
.
get
(
login_url
)
...
...
@@ -16,9 +16,10 @@ def index_first():
return
None
@shared_task
(
name
=
"majia.tasks.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
=
[]
dicts
=
{}
...
...
physical/celery_task_router.py
View file @
b14bafa0
...
...
@@ -4,20 +4,20 @@ from django.conf import settings
import
itertools
import
logging
class
CeleryTaskRouter
(
object
):
queue_task_map
=
{
"tapir-alpha"
:
[
'injection.data_sync.tasks.write_to_es'
,
],
"majia-alpha"
:
[
'
injection.data_sync
.auto_instant_click.auto_click'
,
'
majia
.auto_instant_click.auto_click'
,
],
"majia-alpha"
:
[
'
injection.data_sync
.auto_instant_click.auto_reply'
,
'
majia
.auto_instant_click.auto_reply'
,
]
}
# Map[TaskName, QueueName]
task_queue_map
=
dict
(
itertools
.
chain
.
from_iterable
(
[(
task
,
queue
)
for
task
in
task_list
]
...
...
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