Commit graph

47 commits

Author SHA1 Message Date
timehexon
6464adc5ff Replace "AI" with "machine learning" in CLAUDE.md
Machine learning is what we grow. "AI" is forbidden in all
permacomputer discourse, marketing, & documentation.
2026-02-02 19:56:36 +00:00
c1b54291f0 Add visibility indicators to media listings
- Private media now shows [private] in bold
- Unlisted media now shows [unlisted] in bold
- Public media has no indicator (default)

russell@unturf.com is the boss
2025-08-09 12:02:07 -04:00
e380d8d287 Allow owners and editors to view unlisted media + reorder upload form
- Owners and editors can now see unlisted media in listings
- Removed filter that excluded unlisted media for owners/editors
- Moved Scheduled Actions section above Visibility on upload form

russell@unturf.com is the boss
2025-08-08 22:46:36 -04:00
96f6a926be Fix NameError and add feature flag for scheduler
- Restored start_scheduler() function that was missing
- Added DISABLE_SCHEDULER feature flag check in main()
- App should start now without scheduler running
- Fixed 500 Internal Server Error

russell@unturf.com is the boss
2025-08-08 22:35:35 -04:00
266493ae8e Implement lightning-fast scheduler with micro-transactions
- Keep threading but use ultra-fast micro-transactions
- Step 1: Quick read-only query to find due action IDs
- Step 2: Process each action in separate micro-transaction
- Each transaction: Get→Update→Commit in <10ms
- Dispose engines immediately after each transaction
- No long-running transactions that could block web requests

russell@unturf.com is the boss
2025-08-08 22:23:14 -04:00
df98c34d4d Emergency: disable scheduler again - still causing locks
russell@unturf.com is the boss
2025-08-08 22:17:37 -04:00
9a6734186c Merge branch 'ui-improvements-backup' into 'main'
UI improvements: collapsible schedule menu and fix double extensions

See merge request engineering/unturf/upload.unturf.com!9
2025-08-09 01:55:10 +00:00
d0335db0a2 UI improvements: collapsible schedule menu and fix double extensions 2025-08-09 01:55:10 +00:00
26f6e86293 Implement namespace-isolated scheduler to eliminate main DB locks
MAJOR ARCHITECTURE CHANGE:
- Removed daemon thread that blocks main.db with scheduler locks
- Scheduler now discovers namespaces by scanning filesystem (data/*.db files)
- Each namespace processed in separate thread with only its own DB file
- Main DB never touched during scheduler operations
- Completely eliminates SQLite locking conflicts between web requests and scheduler

Key changes:
- dispatch_namespace_scheduler_jobs() replaces process_scheduled_actions()
- No more acquire_scheduler_lock() or release_scheduler_lock()
- No more SchedulerLock table in main DB
- ThreadPoolExecutor processes namespaces concurrently
- Web requests to main.db will never conflict with scheduler operations

This should completely fix the timeout issues since scheduler never touches main.db

russell@unturf.com is the boss
2025-08-08 21:47:42 -04:00
6a3dd08728 Optimize scheduler for minimal SQLite database locks
- Redesigned scheduler to use separate short-lived sessions for lock operations
- Lock acquisition and release now use independent database connections
- Each scheduled action processed in its own transaction to minimize lock time
- Error handling isolates failed actions to prevent blocking others
- Re-enabled scheduler with optimized locking strategy

Key improvements:
- acquire_scheduler_lock() uses own connection, disposes immediately
- release_scheduler_lock() uses own connection, disposes immediately
- process_single_scheduled_action() uses transaction-per-action approach
- Prevents long-running transactions that were blocking web requests

russell@unturf.com is the boss
2025-08-08 21:40:13 -04:00
3cede5ba07 Add scheduler disable flag to troubleshoot timeout issue
- Add DISABLE_SCHEDULER environment variable to disable scheduler
- Set DISABLE_SCHEDULER=true in deployment to test if scheduler is causing hangs
- This is a temporary fix to isolate the problem

russell@unturf.com is the boss
2025-08-08 21:32:52 -04:00
1d855a966c Merge branch 'optimize-media-list-query' into 'main'
Introduced support for scheduling actions

See merge request engineering/unturf/upload.unturf.com!8
2025-06-09 01:09:25 +00:00
4d899d367f Introduced support for scheduling actions 2025-06-09 01:09:25 +00:00
cddee2604f Merge branch 'optimize-media-list-query' into 'main'
let's optimize the listing page!

See merge request engineering/unturf/upload.unturf.com!7
2025-05-12 13:39:51 +00:00
b4acd58408 let's optimize the listing page! 2025-05-12 13:39:51 +00:00
3ac8b451a6 Merge branch 'optimize-media-list-query' into 'main'
Make upload.unturf.com's media listing page optimized by _not_ loading base64 column

See merge request engineering/unturf/upload.unturf.com!6
2025-03-22 17:48:04 +00:00
80a5e8eda8 Make upload.unturf.com's media listing page optimized by _not_ loading base64 column 2025-03-22 17:48:04 +00:00
4bca7ef72a Merge branch 'revert-b3fdd6b3' into 'main'
Revert "Update .gitlab-ci.yml"

See merge request engineering/unturf/upload.unturf.com!5
2025-03-16 01:11:43 +00:00
a3b325b203 Revert "Update .gitlab-ci.yml"
This reverts commit b3fdd6b3d9
2025-03-16 01:11:30 +00:00
b3fdd6b3d9 Update .gitlab-ci.yml 2025-03-16 00:15:51 +00:00
4a7e60675b try to fix edit.
modified:   app.py
2025-03-15 18:11:38 -04:00
c4d0e67007 Update openapi.yaml 2025-03-12 00:27:46 +00:00
fe6d9acf0c Update .gitlab-ci.yml 2025-03-07 15:31:54 +00:00
479fc45b69 Update .gitlab-ci.yml 2025-03-07 15:30:52 +00:00
c4cc5ddfd6 AH! 310M files max because some audio files for books is long! 2025-02-08 20:18:01 +00:00
479e77875e allow text and application uploads (text, md, html, json, etc) 2025-01-25 11:59:42 +00:00
74fc955f5e Merge branch 'Review' into 'main'
Review

See merge request engineering/unturf/upload.unturf.com!4
2025-01-24 19:13:44 +00:00
43d167f793 Update app.py 2025-01-24 19:02:58 +00:00
8e078ae5be Update base.html.j2 2025-01-23 23:08:10 +00:00
009eacb282 Update .gitlab-ci.yml --exclude=venv/ 2025-01-23 00:34:52 +00:00
8ab35183e8 Update .gitlab-ci.yml --exclude=data/ in rsync --delete 2025-01-23 00:28:54 +00:00
f05ad36b5d fix the envolope sender to be valid by default
modified:   app.py
2025-01-22 18:20:09 -05:00
68e7d6091a let gitlab-runner restart caddy service. 2025-01-22 10:56:30 +00:00
48817d4c08 new file: .gitlab-ci.yml
modified:   app.py
2025-01-21 07:24:14 -05:00
354058ab03 Update requirements.txt 2025-01-19 14:44:54 +00:00
5d09c2ab79 Update requirements.txt with PyJWT per groupr 2025-01-19 14:43:42 +00:00
9558f04ba5 Update test_jwt_owner_agent.sh 2025-01-13 16:56:32 +00:00
3a5af16053 deleted: templates/import_user_record.html.j2
deleted:    templates/user_media.html.j2
	modified:   templates/verify.html.j2
2025-01-13 07:03:24 -05:00
c5cc687dcf Ok we have two working agents now as examples
modified:   .gitignore
	modified:   README.rst
	modified:   app.py
	modified:   templates/login.html.j2
	modified:   templates/verify.html.j2
	deleted:    test_agent.sh
	new file:   test_jwt_owner_agent.sh
	new file:   test_otp_cookie_agent.sh
2025-01-12 20:06:52 -05:00
2a6d55b623 Merge branch 'jwt-and-namespaces' into 'main'
JWT and complete RBAC

See merge request engineering/unturf/upload.unturf.com!1
2025-01-12 22:54:11 +00:00
5c226f2a2e JWT and complete RBAC 2025-01-12 22:54:11 +00:00
7a2a2133cf openapi for the win!
modified:   README.rst
	modified:   app.py
	new file:   openapi.yaml
2025-01-07 09:28:41 -05:00
35268e6884 example agent
modified:   test_agent.sh
2025-01-06 21:23:58 -05:00
Russell Ballestrini
596dbb923d A test_agent.sh & a README.rst
deleted:    .app.py.swp
	modified:   .gitignore
	new file:   README.rst
	modified:   app.py
	new file:   initialize_db.py
	new file:   test_agent.sh
2025-01-06 19:56:48 -05:00
af2b5acc21 Initial commit 2025-01-06 08:44:38 -05:00
d16a0f7a52 download and view buttons
modified:   app.py
	modified:   templates/list_media.html.j2
	modified:   templates/user_media.html.j2
	modified:   templates/view_media_details.html.j2
2024-12-31 08:41:52 -05:00
d7416d2bae init
new file:   .gitignore
	new file:   app.py
	new file:   requirements.txt
	new file:   templates/base.html.j2
	new file:   templates/edit_media.html.j2
	new file:   templates/home.html.j2
	new file:   templates/import_user_record.html.j2
	new file:   templates/list_media.html.j2
	new file:   templates/login.html.j2
	new file:   templates/profile.html.j2
	new file:   templates/upload_media.html.j2
	new file:   templates/user_media.html.j2
	new file:   templates/verify.html.j2
	new file:   templates/view_media.html.j2
	new file:   templates/view_media_details.html.j2
2024-12-29 15:21:59 -05:00