@@ -26,6 +26,7 @@ def cleanup():
if __name__ == '__main__':
# generate_keys(count=1)
print(model.new_stocks(count=3))
- # unused_keys
+ # unused_keys()
+ # model.drop_old_sessions()
cleanup()
@@ -72,7 +72,7 @@ def help():
if num_args > 0:
print('`' + cmd + '`', 'takes the following', num_args, 'arguments:')
for p in params:
- print(' -', p) # TODO print default value
+ print(' -', p)
else:
print('`' + cmd + '`', 'takes no arguments')
@@ -185,7 +185,7 @@ def save_key(key):
def drop_old_sessions():
connect()
- # TODO: test
+
cursor.execute('''
DELETE FROM sessions s1
WHERE
@@ -89,7 +89,8 @@ def order():
limit = None
if 'limit' in request.json:
limit = request.json['limit']
- stop_loss = 'stop_loss' in request.json and bool(request.json['stop_loss']) # TODO is this a string or a bool?
+ stop_loss = 'stop_loss' in request.json and bool(request.json['stop_loss'])
+ # TODO test if stop loss works
if sell:
if not model.user_owns_at_least(user_id, amount, ownership_id):