added comments
This commit is contained in:
parent
9379e0b15a
commit
9eaf984a2b
@ -244,6 +244,11 @@ def _store_aggregated_data(interval, name, result, timerange, user):
|
|||||||
|
|
||||||
|
|
||||||
def _submit_to_remote(data):
|
def _submit_to_remote(data):
|
||||||
|
"""
|
||||||
|
submits data to the backend to be persisted in the database
|
||||||
|
:param data:
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
print(
|
print(
|
||||||
post("{}/trade".format(os.environ.get('BASE_URL', 'https://freq.isaac.international/dev')),
|
post("{}/trade".format(os.environ.get('BASE_URL', 'https://freq.isaac.international/dev')),
|
||||||
@ -253,6 +258,16 @@ def _submit_to_remote(data):
|
|||||||
|
|
||||||
|
|
||||||
def _store_trade_data(interval, name, result, timerange, user):
|
def _store_trade_data(interval, name, result, timerange, user):
|
||||||
|
"""
|
||||||
|
stores individual trades on the remote system
|
||||||
|
|
||||||
|
:param interval:
|
||||||
|
:param name:
|
||||||
|
:param result:
|
||||||
|
:param timerange:
|
||||||
|
:param user:
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
for index, row in result[0].iterrows():
|
for index, row in result[0].iterrows():
|
||||||
_submit_to_remote({
|
_submit_to_remote({
|
||||||
"id": "{}.{}:{}:{}:{}:test".format(user, name, interval, timerange, row['currency'].upper()),
|
"id": "{}.{}:{}:{}:{}:test".format(user, name, interval, timerange, row['currency'].upper()),
|
||||||
|
Loading…
Reference in New Issue
Block a user