link mem_storage.py from README
This commit is contained in:
@@ -128,7 +128,7 @@ Then go to either of the endpoints:
|
|||||||
* http://127.0.0.1:5000/last30m/DJ40J281M584 - list of quotes from the last 30 minutes, grouped by 1 minute intervals, which contain the opening price, closing price, min and max price.
|
* http://127.0.0.1:5000/last30m/DJ40J281M584 - list of quotes from the last 30 minutes, grouped by 1 minute intervals, which contain the opening price, closing price, min and max price.
|
||||||
|
|
||||||
#### "Hot" stream
|
#### "Hot" stream
|
||||||
Upon inserting every quote value, the value is directed to an in-memory data structure: `alerter.mem_storage`
|
Upon inserting every quote value, the value is directed to an in-memory data structure: [alerter.mem_storage](alerter/mem_storage.py).
|
||||||
|
|
||||||
Uses a dictionary to organize by symbol. For each symbol there's 2 data structures:
|
Uses a dictionary to organize by symbol. For each symbol there's 2 data structures:
|
||||||
* An ordered (by time) queue of entries. When a new entry is added to the right, old entries are removed from the left as long as they're older than 5 minutes.
|
* An ordered (by time) queue of entries. When a new entry is added to the right, old entries are removed from the left as long as they're older than 5 minutes.
|
||||||
|
|||||||
Reference in New Issue
Block a user