-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/39 box integration #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aspiringLich
wants to merge
26
commits into
develop
Choose a base branch
from
feature/39-box-integration
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e75a4c2
background task & logging
aspiringLich 74db110
Merge branch 'develop' into feature/39-box-integration
aspiringLich 5305599
upload folders to box
aspiringLich 06e29ee
cleanup & mark chunked uploads as unimplemented
aspiringLich 591a7b3
file caching (not working)
aspiringLich 457183b
tweaks
aspiringLich b7c573d
Merge branch 'main' into feature/39-box-integration
aspiringLich 5ed8da5
review pass
aspiringLich c6ceb54
review pass 2
aspiringLich 88edf16
fix error when deleting files
aspiringLich 4b647db
update database
aspiringLich 8a24124
update image download api
aspiringLich 9837057
Merge branch 'develop' into feature/39-box-integration
aspiringLich fc90e63
update README & fix merge conflict
aspiringLich 3721ad9
update boxsdk
aspiringLich 543557f
Merge branch 'develop' into feature/39-box-integration
aspiringLich 08cbd29
storage backend
aspiringLich 0002f9b
nits
aspiringLich 6b5d9f3
move box upload logic to storage.py
aspiringLich f7e266f
nit (BOX_DEVELOPER_TOKEN overrides BOX_JWT)
aspiringLich b7f104d
box storage tests
aspiringLich 62c5d02
oauth and docker compose examples
aspiringLich 0c8c54c
cleaner storage api
aspiringLich f4e67e9
oauth working mostly!
aspiringLich ea0c92b
update record upload / media upload with new logic
aspiringLich c835dbb
polish storage logic
aspiringLich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Django Settings | ||
| SECRET_KEY=your-secret-key-here | ||
| DEBUG=True | ||
| DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1 | ||
|
aspiringLich marked this conversation as resolved.
|
||
|
|
||
| # Box.com Integration | ||
| BOX_DEVELOPER_TOKEN=your-box-developer-token-here | ||
| BOX_JWT_CONFIG_FILE=/path/to/box-jwt-config.json | ||
| BOX_FOLDER_ID=your-box-folder-id-here | ||
|
|
||
| # Scanner Configuration | ||
| SCANNER_API_BASE=http://localhost:5000 | ||
| SCANNER_DEVICE_ID=scanner-001 | ||
|
|
||
| # BFD9020 AI Service | ||
| BFD9020_BASE_URL=https://wingate.case.edu/bfd9020 | ||
|
|
||
| # CORS Configuration | ||
| CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,34 @@ | ||
| """Django app configuration for the archive app.""" | ||
|
|
||
| import logging | ||
| import os | ||
| import sys | ||
| import threading | ||
|
|
||
| from django.apps import AppConfig | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class ArchiveConfig(AppConfig): | ||
| """Configure default settings for the archive app.""" | ||
| default_auto_field = "django.db.models.BigAutoField" # pyright: ignore[reportAssignmentType] | ||
| name = "archive" | ||
|
|
||
| def ready(self): | ||
| """Initialize the archive app and start background tasks.""" | ||
| # Only start during runserver, not during migrations, tests, etc. | ||
| # Guard against running twice in development (autoreloader issue) | ||
| if 'runserver' in sys.argv and not self._is_reloader_process(): | ||
|
aspiringLich marked this conversation as resolved.
Outdated
|
||
| self._start_background_task() | ||
|
|
||
| def _is_reloader_process(self): | ||
| """Check if this is the reloader process (development only).""" | ||
| return 'runserver' in sys.argv and os.environ.get('RUN_MAIN') != 'true' | ||
|
|
||
| def _start_background_task(self): | ||
| """Start the background media upload thread.""" | ||
| from archive.media_upload import media_upload_worker | ||
|
|
||
| thread = threading.Thread(target=media_upload_worker, daemon=True) | ||
| thread.start() | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.