mirror of
https://github.com/norohind/jubilant-system-web.git
synced 2025-07-17 08:21:37 +03:00
Compare commits
No commits in common. "9dc27157fff3ef7e97c0991950c78f631404afed" and "236082ba80d89c614f2c37e7d3187b0c7dac9190" have entirely different histories.
9dc27157ff
...
236082ba80
@ -99,7 +99,3 @@ class SqliteModel:
|
|||||||
squad[pretty_key] = squad.pop(key)
|
squad[pretty_key] = squad.pop(key)
|
||||||
|
|
||||||
return squads
|
return squads
|
||||||
|
|
||||||
def name2tags(self, name: str) -> list[dict]:
|
|
||||||
v = self.get_db().execute(sqlite_sql_requests.name2tags, {'name': name}).fetchall()
|
|
||||||
return v
|
|
||||||
|
@ -43,12 +43,3 @@ from squadrons_current_data
|
|||||||
where tag like :tag
|
where tag like :tag
|
||||||
order by platform;
|
order by platform;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name2tags = """select
|
|
||||||
platform,
|
|
||||||
squad_id,
|
|
||||||
updated as updated_at,
|
|
||||||
name,
|
|
||||||
tag
|
|
||||||
from squadrons_current_data
|
|
||||||
where lower(name) = lower(:name);"""
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
falcon
|
|
||||||
loguru
|
|
16
uwsgi.ini
16
uwsgi.ini
@ -1,16 +0,0 @@
|
|||||||
[uwsgi]
|
|
||||||
master = 1
|
|
||||||
vacuum = true
|
|
||||||
socket = 127.0.0.1:8084
|
|
||||||
enable-threads = true
|
|
||||||
die-on-term = true
|
|
||||||
thunder-lock = false
|
|
||||||
threads = 1
|
|
||||||
processes = 4
|
|
||||||
wsgi-file = /home/user2/projects_production/jubilant-system-web/web/__init__.py
|
|
||||||
chdir = /home/user2/projects_production/jubilant-system-web
|
|
||||||
virtualenv = /home/user2/projects_production/jubilant-system-web/venv
|
|
||||||
uid = user2
|
|
||||||
gid = user2
|
|
||||||
need-app = true
|
|
||||||
plugin = python3
|
|
@ -67,11 +67,6 @@ class SquadsInfoByTag:
|
|||||||
resp.text = json.dumps(model_answer)
|
resp.text = json.dumps(model_answer)
|
||||||
|
|
||||||
|
|
||||||
class SquadsName2Tags:
|
|
||||||
def on_get(self, req: falcon.request.Request, resp: falcon.response.Response, name: str):
|
|
||||||
resp.content_type = falcon.MEDIA_JSON
|
|
||||||
resp.text = json.dumps(model.name2tags(name))
|
|
||||||
|
|
||||||
class AppFixedLogging(falcon.App):
|
class AppFixedLogging(falcon.App):
|
||||||
def _python_error_handler(self, req: falcon.request.Request, resp: falcon.response.Response, error, params):
|
def _python_error_handler(self, req: falcon.request.Request, resp: falcon.response.Response, error, params):
|
||||||
__exception__ = error
|
__exception__ = error
|
||||||
@ -84,7 +79,6 @@ application.add_route('/squads/now/by-tag/{details_type}/{tag}', SquadsInfoByTag
|
|||||||
|
|
||||||
application.add_route('/api/squads/now/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=False))
|
application.add_route('/api/squads/now/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=False))
|
||||||
application.add_route('/api/squads/now/search/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=True))
|
application.add_route('/api/squads/now/search/by-tag/{details_type}/{tag}', SquadsInfoByTag(is_pattern=True))
|
||||||
application.add_route('/api/squads/now/by-name/{name}', SquadsName2Tags())
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import waitress
|
import waitress
|
||||||
|
Loading…
x
Reference in New Issue
Block a user