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
d0de0ee7
Commit
d0de0ee7
authored
5 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
eeab3c2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
tasks.py
majia/tasks.py
+9
-7
No files found.
majia/tasks.py
View file @
d0de0ee7
...
...
@@ -17,7 +17,7 @@ def index_first():
return
None
@shared_task
(
name
=
"majia.tasks.get_cook"
)
#
@shared_task(name="majia.tasks.get_cook")
def
get_cook
():
data
=
open
(
"/srv/apps/physical/majia/majia_email.txt"
,
"r"
)
list
=
[]
...
...
@@ -45,9 +45,11 @@ def get_cook():
logging
.
info
(
"response.text :
%
s"
%
response
.
text
)
dicts
[
i
]
=
cook
with
open
(
"/srv/apps/physical/majia/user_session.txt"
,
'w'
)
as
f
:
for
key
,
value
in
dicts
.
items
():
f
.
write
(
key
)
f
.
write
(
","
)
f
.
write
(
value
)
f
.
write
(
"
\n
"
)
dicts
=
get_cook
()
with
open
(
"/srv/apps/physical/majia/user_session.txt"
,
'w'
)
as
f
:
for
key
,
value
in
dicts
.
items
():
f
.
write
(
key
)
f
.
write
(
","
)
f
.
write
(
value
)
f
.
write
(
"
\n
"
)
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