Commit b81bb07f by rongjun

init

parent ecbb1222
...@@ -80,6 +80,7 @@ def cta(timestamp, last_price, task): ...@@ -80,6 +80,7 @@ def cta(timestamp, last_price, task):
TaskNotify.objects.create(task_id=task.get('id'), point=point_val) TaskNotify.objects.create(task_id=task.get('id'), point=point_val)
if over: if over:
Task.remove_task(task) Task.remove_task(task)
logger.error(content)
send(title, content, task.get('emails')) send(title, content, task.get('emails'))
except IntegrityError: except IntegrityError:
pass pass
...@@ -91,6 +92,7 @@ def cta(timestamp, last_price, task): ...@@ -91,6 +92,7 @@ def cta(timestamp, last_price, task):
def push(request): def push(request):
data = request.GET.get('data') data = request.GET.get('data')
data = data.split(',') data = data.split(',')
print(data)
timestamp = int(data[0].split('.')[0]) timestamp = int(data[0].split('.')[0])
instrument = data[1] instrument = data[1]
last_price = Decimal(data[2]) last_price = Decimal(data[2])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment