Compare commits

...

11 Commits

Author SHA1 Message Date
FrederikBaerentsen 5641b3e740 Merge branch 'master' into hotfix/pagination-bug 2025-09-23 17:12:37 +02:00
FrederikBaerentsen 9317a1baae Removed code for another feature 2025-09-23 17:10:13 +02:00
FrederikBaerentsen 6f6d90aa60 fix(pagination): Fixed socket gevent (#95) 2025-09-23 17:06:18 +02:00
FrederikBaerentsen 83a45795c3 Merge pull request 'fix(pagination): Fix #95. Switch from eventlet to gevent' (#98) from hotfix/pagination-bug into master
Reviewed-on: #98
2025-09-23 16:51:27 +02:00
FrederikBaerentsen 572c52dada fix(pagination): Added requirements.txt 2025-09-23 16:46:43 +02:00
FrederikBaerentsen 909655c10a fix(pagination): Fix #95. Switch from eventlet to gevent 2025-09-23 16:42:03 +02:00
FrederikBaerentsen c71667cd41 Fix: #80, default images not downloading (also present in feature/pagination) 2025-09-17 18:07:28 +02:00
FrederikBaerentsen 787a376553 Fixed sorting issue on minifigs, updated change log and version. 2025-09-16 10:44:47 +02:00
FrederikBaerentsen 7f4be9da36 Updated gitignore 2025-09-16 10:43:52 +02:00
FrederikBaerentsen d6f69bca9d Merge pull request 'Added migration to get new bricklink data fields, fixed bricklink links, added set refresh based on missing bricklink data' (#88) from feature/bricklink-data into master
Reviewed-on: #88

Fixes #87 and #55
2025-09-16 10:34:44 +02:00
FrederikBaerentsen 40b63fff6a Merge pull request 'Added filter/sort/search to /minifigures and /parts' (#86) from feature/sort-search-filter into master
Reviewed-on: #86
2025-09-16 09:37:33 +02:00
11 changed files with 43 additions and 12 deletions
+2
View File
@@ -21,6 +21,8 @@ static/sets/
# Temporary
*.csv
/local/
run_local.sh
settings.local.json
# Apple idiocy
.DS_Store
+6 -6
View File
@@ -1,12 +1,8 @@
# Changelog
## Unreleased
## Unreleased
### Current PR
- Added search/filter/sort options to `parts` and `minifigures`.
### Next PR
### 1.2.4
> **Warning**
> To use the new BrickLink color parameter in URLs, update your `.env` file:
@@ -18,6 +14,10 @@
- Enhanced BrickLink URL generation with proper part number fallback
- Extended admin set refresh to detect and track missing BrickLink data
## 1.2.3
Added search/filter/sort options to `parts` and `minifigures`.
## 1.2.2
Fix legibility of "Damaged" and "Missing" fields for tiny screen by reducing horizontal padding
+3
View File
@@ -5,6 +5,9 @@ WORKDIR /app
# Bricktracker
COPY . .
# Fix line endings and set executable permissions for entrypoint script
RUN sed -i 's/\r$//' entrypoint.sh && chmod +x entrypoint.sh
# Python library requirements
RUN pip --no-cache-dir install -r requirements.txt
+2 -2
View File
@@ -1,6 +1,6 @@
# This need to be first
import eventlet
eventlet.monkey_patch()
import gevent.monkey
gevent.monkey.patch_all()
import logging # noqa: E402
+1 -1
View File
@@ -70,7 +70,7 @@ class BrickSocket(object):
*args,
**kwargs,
path=app.config['SOCKET_PATH'],
async_mode='eventlet',
async_mode='gevent',
)
# Store the socket in the app config
+1 -1
View File
@@ -1,4 +1,4 @@
from typing import Final
__version__: Final[str] = '1.2.2'
__version__: Final[str] = '1.2.4'
__database_version__: Final[int] = 17
+4 -1
View File
@@ -25,6 +25,7 @@ def update() -> Response:
BrickSet(),
minifigure=BrickMinifigure(record={
'set_img_url': None,
'image': None,
})
).download()
@@ -33,7 +34,9 @@ def update() -> Response:
BrickSet(),
part=BrickPart(record={
'part_img_url': None,
'part_img_url_id': None
'part_img_url_id': None,
'image_id': None,
'image': None,
})
).download()
+1 -1
View File
@@ -13,4 +13,4 @@ then
fi
# Execute the WSGI server
gunicorn --bind "${BK_SERVER}:${BK_PORT}" "app:create_app()" --worker-class "eventlet" "$@"
gunicorn --bind "${BK_HOST}:${BK_PORT}" "wsgi:application" --worker-class "gevent" --workers 1 "$@"
+1
View File
@@ -2,6 +2,7 @@ eventlet
flask
flask_socketio
flask-login
gevent
gunicorn
humanize
jinja2
+4
View File
@@ -91,8 +91,12 @@
<script src="{{ url_for('static', filename='scripts/socket/instructions.js') }}"></script>
<script src="{{ url_for('static', filename='scripts/socket/set.js') }}"></script>
<script src="{{ url_for('static', filename='scripts/table.js') }}"></script>
{% if request.endpoint == 'minifigure.list' %}
<script src="{{ url_for('static', filename='scripts/minifigures.js') }}"></script>
{% endif %}
{% if request.endpoint == 'part.list' %}
<script src="{{ url_for('static', filename='scripts/parts.js') }}"></script>
{% endif %}
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
setup_grids();
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
"""
WSGI entry point for BrickTracker - Production Docker deployment
This ensures proper gevent monkey patching before any imports
"""
# CRITICAL: Monkey patch must be first, before ANY other imports
import gevent.monkey
gevent.monkey.patch_all()
# Now import the regular app factory
from app import create_app
# Create the application - this will be a BrickSocket instance
app_instance = create_app()
# For gunicorn, we need the Flask app, not the BrickSocket wrapper
application = app_instance.app if hasattr(app_instance, 'app') else app_instance