Now possible to spread price sampling out throughout the day #961
Replies: 2 comments
-
I've been using the new and improved price update methods (its definitely faster) but I'm not sure if I've implemented things correctly or if there is an issue (probably the former).
It doesn't restart for the second or third downloads in the afternoon
Is there anything else that I am missing to ensure the process doesn't close? |
Beta Was this translation helpful? Give feedback.
-
Weird it doesn't look like this log event was triggered:
|
Beta Was this translation helpful? Give feedback.
-
Last piece of work from #913
This code allows you to sample Asian markets in the morning, Europe late afternoon, US in the evening. When you're sampling a large number of instruments, this makes life better than downloading a single large blob in one go.
To achieve this:
private_control_config.yaml
file:This will download Asian regional instruments at 7am, local machine time; Europe Middle East Africa at 6pm, and US at 8pm. These are local machine times not UTC. Feel free to change them.
If you want to use different regions, you will need to change these.
run_daily_price_updates
has a start time set inprivate_control_config.yaml
earlier than 7am, and is started by the crontab (or other scheduler) before 7am.Nerdy details: The run_daily_prices process will need to run once, continously throughout the day, starting before the first sample time (although if it doesn't, it will start sampling as soon as it can). It won't obey a STOP or PAUSE process control command, since we're running a single method that does it's own scheduling. If you need to kill it, you will have to use command line kill. If you restart it, it will lose all memory of what it has downloaded before, and redownload any regions whose start time has passed.
Beta Was this translation helpful? Give feedback.
All reactions