jorricks / dutyboard Goto Github PK
View Code? Open in Web Editor NEWOverview of Duty calendars using iCalendar
License: Apache License 2.0
Overview of Duty calendars using iCalendar
License: Apache License 2.0
Currently when we are using the production version where the GZIPs are already pre-computed, the GZIPS response header for content-length
is invalid. As the value is based on the non-GZIPPED file.
This also yields the following exception in the webserver;
INFO: 172.16.223.89:40306 - "GET /main.77b972f2406e89fc2985.css HTTP/1.1" 200 OK
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/bigdata/venv/lib64/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/bigdata/venv/lib64/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/fastapi/applications.py", line 270, in __call__
await super().__call__(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/applications.py", line 125, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/cors.py", line 84, in __call__
await self.app(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/home/bigdata/venv/lib64/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/home/bigdata/venv/lib64/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/routing.py", line 706, in __call__
await route.handle(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/routing.py", line 443, in handle
await self.app(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/staticfiles.py", line 102, in __call__
await response(scope, receive, send)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/responses.py", line 354, in __call__
await send(
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/exceptions.py", line 65, in sender
await send(message)
File "/home/bigdata/venv/lib64/python3.9/site-packages/starlette/middleware/errors.py", line 159, in _send
await send(message)
File "/home/bigdata/venv/lib64/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 520, in send
output = self.conn.send(event)
File "/home/bigdata/venv/lib64/python3.9/site-packages/h11/_connection.py", line 512, in send
data_list = self.send_with_data_passthrough(event)
File "/home/bigdata/venv/lib64/python3.9/site-packages/h11/_connection.py", line 545, in send_with_data_passthrough
writer(event, data_list.append)
File "/home/bigdata/venv/lib64/python3.9/site-packages/h11/_writers.py", line 67, in __call__
self.send_eom(event.headers, write)
File "/home/bigdata/venv/lib64/python3.9/site-packages/h11/_writers.py", line 96, in send_eom
raise LocalProtocolError("Too little data for declared Content-Length")
h11._util.LocalProtocolError: Too little data for declared Content-Length
02-23 16:02 duty_board.worker_loop INFO Updating plugin calendars in the database.
Traceback (most recent call last):
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.ForeignKeyViolation: update or delete on table "calendar" violates foreign key constraint "on_call_event_calendar_uid_fkey" on table "on_call_event"
DETAIL: Key (uid)=(CDI-IS) is still referenced from table "on_call_event".
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bigdata/venv/bin/dutyBoard", line 8, in <module>
sys.exit(cli())
File "/home/bigdata/venv/lib64/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/bigdata/venv/lib64/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/bigdata/venv/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/bigdata/venv/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/bigdata/venv/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/bigdata/venv/lib64/python3.9/site-packages/duty_board/main.py", line 27, in worker
worker_loop.enter_loop()
File "/home/bigdata/venv/lib64/python3.9/site-packages/duty_board/worker_loop.py", line 133, in enter_loop
queries.sync_duty_calendar_configurations_to_postgres(session, plugin.duty_calendar_configurations)
File "/home/bigdata/venv/lib64/python3.9/site-packages/duty_board/alchemy/queries.py", line 155, in sync_duty_calendar_configurations_to_postgres
session.query(Calendar).where(Calendar.uid.not_in(all_described_calendar_uids)).delete()
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 3222, in delete
result = self.session.execute(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/orm/session.py", line 1714, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
return connection._execute_clauseelement(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/home/bigdata/venv/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.ForeignKeyViolation) update or delete on table "calendar" violates foreign key constraint "on_call_event_calendar_uid_fkey" on table "on_call_event"
DETAIL: Key (uid)=(CDI-IS) is still referenced from table "on_call_event".
[SQL: DELETE FROM calendar WHERE (calendar.uid NOT IN (%(uid_1_1)s, %(uid_1_2)s, %(uid_1_3)s, %(uid_1_4)s, %(uid_1_5)s, %(uid_1_6)s, %(uid_1_7)s, %(uid_1_8)s, %(uid_1_9)s, %(uid_1_10)s, %(uid_1_11)s, %(uid_1_12)s, %(uid_1_13)s, %(uid_1_14)s, %(uid_1_15)s, %(uid_1_16)s, %(uid_1_17)s, %(uid_1_18)s, %(uid_1_19)s, %(uid_1_20)s, %(uid_1_21)s, %(uid_1_22)s, %(uid_1_23)s, %(uid_1_24)s, %(uid_1_25)s, %(uid_1_26)s, %(uid_1_27)s, %(uid_1_28)s, %(uid_1_29)s))]
[parameters: {'uid_1_1': 'PQAAAAA',....,'uid_1_29': 'PZAAAAA'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
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.