|
- # -*-coding:utf-8 -*-
- from enums.StatusEnum import StatusType
- from util.QueUtil import put_queue
- from util.TimeUtils import now_date_to_str
-
-
- def push_result(fb_queue, errorCode="", errorMsg="", status=StatusType.RUNNING.value[0]):
- put_queue(fb_queue, ('stream',
- {
- "errorCode": errorCode,
- "errorMsg": errorMsg,
- "status": status,
- "currentTime": now_date_to_str()
- }),
- timeout=2)
-
-
- def push_http_result(fb_queue, callback_url=None, errorCode="", errorMsg="", status=StatusType.RUNNING.value[0]):
- if callback_url is not None:
- put_queue(fb_queue, ('stream',
- {
- "callback_url": callback_url,
- "data": {
- "errorCode": errorCode,
- "errorMsg": errorMsg,
- "status": status,
- "currentTime": now_date_to_str()
- }
- }),
- timeout=2)
|