Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
robo-dividend
Project
Project
Details
Activity
Releases
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
wenwen.tang
robo-dividend
Commits
a3e3b115
Commit
a3e3b115
authored
Dec 24, 2022
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步汇率
parent
c04fa187
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
sync.py
basic/sync.py
+2
-1
test_case.py
basic/test_case.py
+7
-1
No files found.
basic/sync.py
View file @
a3e3b115
...
...
@@ -201,6 +201,7 @@ class ExrateSync(DataSync):
'date'
:
dt
.
fromtimestamp
(
x
[
'date'
]
/
1000
),
'close'
:
x
[
'close'
],
}
for
x
in
response
[
'body'
][
'content'
]]
if
save_dates
:
re
.
batch_insert
(
save_dates
)
except
Exception
as
e
:
logger
.
exception
(
f
'url[{url}] store data failed'
)
...
...
basic/test_case.py
View file @
a3e3b115
import
logging
import
unittest
from
typing
import
List
import
pandas
as
pd
from
py_jftech
import
autowired
,
parse_date
,
to_str
...
...
@@ -34,7 +35,12 @@ class BasicTest(unittest.TestCase):
sync
.
do_sync
()
@
autowired
(
names
=
{
'sync'
:
'exrate-sync'
})
def
test_navs_sync
(
self
,
sync
:
DataSync
=
None
):
def
test_exrate_sync
(
self
,
sync
:
DataSync
=
None
):
sync
.
do_sync
()
@
autowired
def
test_sync
(
self
,
syncs
:
List
[
DataSync
]
=
None
):
for
sync
in
syncs
:
sync
.
do_sync
()
@
autowired
(
names
=
{
'report'
:
'navs-report'
})
...
...
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