Manual mergre from local code
This commit is contained in:
parent
ccd5d6874d
commit
c103fd34a3
@ -48,6 +48,15 @@ services:
|
||||
- mongo
|
||||
networks:
|
||||
- phone
|
||||
worker-dev:
|
||||
build: ./worker-dev
|
||||
restart: always
|
||||
environment:
|
||||
- TZ=Asia/Krasnoyarsk
|
||||
depends_on:
|
||||
- mongo
|
||||
networks:
|
||||
- phone
|
||||
web:
|
||||
build: ./web
|
||||
restart: always
|
||||
|
@ -29,7 +29,7 @@ IgnoreList = ['83919865589', '83912051046', '83912051045', '84950213944', '84951
|
||||
|
||||
@app.route("/web/call/")
|
||||
def WebCall():
|
||||
call = coll_call.find().sort('time', -1)
|
||||
call = coll_call.find().limit(findLimit).sort('time', -1)
|
||||
return render_template("WebCall.html", call=call)
|
||||
|
||||
@app.route("/web/call/status/<id>")
|
||||
|
@ -22,6 +22,7 @@
|
||||
<!-- <td>Номер оператора</td> -->
|
||||
<td>Дата время</td>
|
||||
<td>Дополнитительная информация</td>
|
||||
<td>uuid</td>
|
||||
</tr>
|
||||
|
||||
<body>
|
||||
@ -54,6 +55,8 @@
|
||||
{% if entry.reason|length > 1 %}
|
||||
{{ entry.reason }}
|
||||
{% endif %}
|
||||
|
||||
<td> {{ entry.uuid }}</td>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
@ -63,7 +63,6 @@ def main():
|
||||
insDict = {"client": srcJson['from'], "time": srcJson['time'], "status": 0,
|
||||
"recordUrl": srcJson["recordUrl"], "duration": srcJson["duration"], "important": tmpIncoming[srcJson['uuid']][2]}
|
||||
except Exception as e:
|
||||
# print(srcJson)
|
||||
print(e)
|
||||
insDict = {
|
||||
"client": srcJson['from'], "time": srcJson['time'], "status": 1, "important": tmpIncoming[srcJson['uuid']][2]}
|
||||
@ -94,11 +93,11 @@ def main():
|
||||
#r = coll_phone.update_one({'$and': [{'client': {'$regex': srcJson['to']}}, {'status': 1}]}, {'$set': {'status': 2, 'callid': srcJson['uuid']}})
|
||||
r = coll_phone.update_one({'$and': [{'client': {'$regex': srcJson['to']}}, {'status': {'$in': [1,4]}}]}, {'$set': {'status': 2, 'callid': srcJson['uuid']}})
|
||||
if srcJson['state'] == 'HANGUP':
|
||||
try:
|
||||
try:
|
||||
# Проверяем заполнено ли поле recordURL, если нет то меняем статус на 4
|
||||
if len(srcJson['recordUrl']) > 4:
|
||||
coll_phone.update_one({'callid':srcJson['uuid']}, {'$set': {'recordUrl': srcJson['recordUrl']}})
|
||||
else:
|
||||
else:
|
||||
coll_phone.update_one({'callid':srcJson['uuid']}, {'$set': {'status': 4}})
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user