ameerbadri / twilio-taskrouter-realtime-dashboard Goto Github PK
View Code? Open in Web Editor NEWTwilio TaskRouter Realtime Dashboard using Sync
Twilio TaskRouter Realtime Dashboard using Sync
Z:>heroku logs --tail --app twilioflexdash
2019-09-18T13:31:13.946164+00:00 app[web.1]: Arbiter(self).run()
2019-09-18T13:31:13.946166+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 231, in run
2019-09-18T13:31:13.946353+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2019-09-18T13:31:13.946355+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 344, in halt
2019-09-18T13:31:13.946534+00:00 app[web.1]: self.stop()
2019-09-18T13:31:13.946536+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 393, in stop
2019-09-18T13:31:13.947762+00:00 app[web.1]: time.sleep(0.1)
2019-09-18T13:31:13.947764+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 244, in handle_chld
2019-09-18T13:31:13.948577+00:00 app[web.1]: self.reap_workers()
2019-09-18T13:31:13.948580+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 524, in reap_workers
2019-09-18T13:31:13.948967+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-09-18T13:31:13.948972+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-09-18T13:31:14.000000+00:00 app[api]: Build succeeded
2019-09-18T13:31:19.342418+00:00 heroku[web.1]: Starting process with command gunicorn taskrouter_dashboard:app
2019-09-18T13:31:22.727004+00:00 app[web.1]: [2019-09-18 13:31:22 +0000] [4] [INFO] Starting gunicorn 19.7.1
2019-09-18T13:31:22.728190+00:00 app[web.1]: [2019-09-18 13:31:22 +0000] [4] [INFO] Listening at: http://0.0.0.0:30971 (4)
2019-09-18T13:31:22.728606+00:00 app[web.1]: [2019-09-18 13:31:22 +0000] [4] [INFO] Using worker: sync
2019-09-18T13:31:22.735717+00:00 app[web.1]: [2019-09-18 13:31:22 +0000] [10] [INFO] Booting worker with pid: 10
2019-09-18T13:31:22.758966+00:00 app[web.1]: [2019-09-18 13:31:22 +0000] [11] [INFO] Booting worker with pid: 11
2019-09-18T13:31:23.147906+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [10] [ERROR] Exception in worker process
2019-09-18T13:31:23.147988+00:00 app[web.1]: Traceback (most recent call last):
2019-09-18T13:31:23.147996+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
2019-09-18T13:31:23.147999+00:00 app[web.1]: worker.init_process()
2019-09-18T13:31:23.148001+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2019-09-18T13:31:23.148003+00:00 app[web.1]: self.load_wsgi()
2019-09-18T13:31:23.148005+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
2019-09-18T13:31:23.148007+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-09-18T13:31:23.148011+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-09-18T13:31:23.148013+00:00 app[web.1]: self.callable = self.load()
2019-09-18T13:31:23.148014+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2019-09-18T13:31:23.148017+00:00 app[web.1]: return self.load_wsgiapp()
2019-09-18T13:31:23.148019+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2019-09-18T13:31:23.148021+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-09-18T13:31:23.148023+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
2019-09-18T13:31:23.148025+00:00 app[web.1]: import(module)
2019-09-18T13:31:23.148028+00:00 app[web.1]: File "/app/taskrouter_dashboard.py", line 3, in
2019-09-18T13:31:23.148030+00:00 app[web.1]: from flask import Flask, request, Response, jsonify, send_from_directory
2019-09-18T13:31:23.148032+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/init.py", line 21, in
2019-09-18T13:31:23.148034+00:00 app[web.1]: from .app import Flask
2019-09-18T13:31:23.148036+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 69, in
2019-09-18T13:31:23.148038+00:00 app[web.1]: from .wrappers import Request
2019-09-18T13:31:23.148040+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/wrappers.py", line 14, in
2019-09-18T13:31:23.148042+00:00 app[web.1]: from werkzeug.wrappers.json import JSONMixin as _JSONMixin
2019-09-18T13:31:23.148043+00:00 app[web.1]: ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package
2019-09-18T13:31:23.150149+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-09-18T13:31:23.180174+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [11] [ERROR] Exception in worker process
2019-09-18T13:31:23.180178+00:00 app[web.1]: Traceback (most recent call last):
2019-09-18T13:31:23.180181+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
2019-09-18T13:31:23.180184+00:00 app[web.1]: worker.init_process()
2019-09-18T13:31:23.180186+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
2019-09-18T13:31:23.180188+00:00 app[web.1]: self.load_wsgi()
2019-09-18T13:31:23.180191+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
2019-09-18T13:31:23.180193+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-09-18T13:31:23.180195+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-09-18T13:31:23.180197+00:00 app[web.1]: self.callable = self.load()
2019-09-18T13:31:23.180199+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2019-09-18T13:31:23.180201+00:00 app[web.1]: return self.load_wsgiapp()
2019-09-18T13:31:23.180203+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2019-09-18T13:31:23.180205+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-09-18T13:31:23.180207+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
2019-09-18T13:31:23.180209+00:00 app[web.1]: import(module)
2019-09-18T13:31:23.180212+00:00 app[web.1]: File "/app/taskrouter_dashboard.py", line 3, in
2019-09-18T13:31:23.180214+00:00 app[web.1]: from flask import Flask, request, Response, jsonify, send_from_directory
2019-09-18T13:31:23.180216+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/init.py", line 21, in
2019-09-18T13:31:23.180218+00:00 app[web.1]: from .app import Flask
2019-09-18T13:31:23.180221+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 69, in
2019-09-18T13:31:23.180223+00:00 app[web.1]: from .wrappers import Request
2019-09-18T13:31:23.180225+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/wrappers.py", line 14, in
2019-09-18T13:31:23.180227+00:00 app[web.1]: from werkzeug.wrappers.json import JSONMixin as _JSONMixin
2019-09-18T13:31:23.180314+00:00 app[web.1]: ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package
2019-09-18T13:31:23.181221+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-09-18T13:31:23.328491+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [4] [INFO] Shutting down: Master
2019-09-18T13:31:23.328663+00:00 app[web.1]: [2019-09-18 13:31:23 +0000] [4] [INFO] Reason: Worker failed to boot.
2019-09-18T13:31:23.439512+00:00 heroku[web.1]: State changed from starting to crashed
2019-09-18T13:31:23.414498+00:00 heroku[web.1]: Process exited with status 3
I'm getting this error:
2022-04-02T03:48:04.685436+00:00 app[web.1]: self.reap_workers() 2022-04-02T03:48:04.685436+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.10/site-packages/gunicorn/arbiter.py", line 524, in reap_workers 2022-04-02T03:48:04.685437+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR) 2022-04-02T03:48:04.685437+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> 2022-04-02T03:48:04.896513+00:00 heroku[web.1]: Process exited with status 1 2022-04-02T03:48:04.964719+00:00 heroku[web.1]: State changed from starting to crashed
do you display call analytics like no of calls, duration etc ?
2019-09-24T16:03:36.219921+00:00 app[web.1]: ERROR:taskrouter_dashboard:Exception on /taskrouter_tasks [GET]
2019-09-24T16:03:36.219924+00:00 app[web.1]: Traceback (most recent call last):
2019-09-24T16:03:36.219926+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
2019-09-24T16:03:36.219928+00:00 app[web.1]: response = self.full_dispatch_request()
2019-09-24T16:03:36.219929+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
2019-09-24T16:03:36.219931+00:00 app[web.1]: rv = self.handle_user_exception(e)
2019-09-24T16:03:36.219933+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
2019-09-24T16:03:36.219934+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2019-09-24T16:03:36.219936+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
2019-09-24T16:03:36.219937+00:00 app[web.1]: raise value
2019-09-24T16:03:36.219939+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
2019-09-24T16:03:36.219940+00:00 app[web.1]: rv = self.dispatch_request()
2019-09-24T16:03:36.219942+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
2019-09-24T16:03:36.219943+00:00 app[web.1]: return self.view_functionsrule.endpoint
2019-09-24T16:03:36.219945+00:00 app[web.1]: File "/app/taskrouter_dashboard.py", line 108, in taskrouter_tasks
2019-09-24T16:03:36.219947+00:00 app[web.1]: if (task_model['channel'] == 'video'):
2019-09-24T16:03:36.219948+00:00 app[web.1]: KeyError: 'channel'
Hello,
I had a few questions about the dashboard creation. I wanted to ask if this dashboard file could be modified to create some other kind of dashboard and if that dashboard can be connected to a database. I am not a developer so i needed some suggestions regarding that.
I am trying to deploy this to Heroku but it is failing.
-----> Python app detected
-----> Installing python-3.6.12
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting certifi==2017.7.27.1
Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349 kB)
Collecting chardet==3.0.4
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==6.7
Downloading click-6.7-py2.py3-none-any.whl (71 kB)
Collecting flask>=0.12.3
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting gunicorn==19.7.1
Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111 kB)
Collecting idna==2.5
Downloading idna-2.5-py2.py3-none-any.whl (55 kB)
Collecting itsdangerous==0.24
Downloading itsdangerous-0.24.tar.gz (46 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting MarkupSafe==1.0
Downloading MarkupSafe-1.0.tar.gz (14 kB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dtjpifo5/MarkupSafe/setup.py'"'"'; file='"'"'/tmp/pip-install-dtjpifo5/MarkupSafe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-phy1t_qh
cwd: /tmp/pip-install-dtjpifo5/MarkupSafe/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-dtjpifo5/MarkupSafe/setup.py", line 6, in
from setuptools import setup, Extension, Feature
ImportError: cannot import name 'Feature'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.