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
ab524cd0
Commit
ab524cd0
authored
Oct 31, 2024
by
吕先亚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai 通用性改动,bugfix
parent
14a17718
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
sp500.py
basic/sp500.py
+1
-1
sync.py
basic/sync.py
+6
-3
No files found.
basic/sp500.py
View file @
ab524cd0
...
...
@@ -116,7 +116,7 @@ def sync_sp500(day):
if
day
:
files
=
list_files_sorted_by_name
(
Path
(
__file__
)
.
parent
/
'resources'
,
day
)
if
files
:
file
=
files
[
-
1
]
file
=
files
[
0
]
else
:
return
[]
wb
=
load_workbook
(
filename
=
file
,
data_only
=
True
)
...
...
basic/sync.py
View file @
ab524cd0
...
...
@@ -247,9 +247,12 @@ class EcoSync(EcoSync):
for
datum
in
self
.
_datum
.
get_datums
(
type
=
self
.
datum_type
):
if
datum
.
get
(
"source"
)
==
"calculating"
:
logger
.
debug
(
f
'start sync ticker[{datum["bloombergTicker"]}]'
)
start_date
=
self
.
datum_start_date
(
datum
[
'id'
])
datas
=
sync_sp500
(
start_date
)
self
.
store_date
(
datum
[
'id'
],
datas
)
while
True
:
datas
=
sync_sp500
(
self
.
datum_start_date
(
datum
[
'id'
]))
if
datas
:
self
.
store_date
(
datum
[
'id'
],
datas
)
else
:
break
def
store_date
(
self
,
datumid
,
datas
:
List
[
dict
]):
save_datas
=
[{
...
...
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