Don't connect to GitHub when reloading development server #285

Closed
opened 2024-10-22 16:05:57 +00:00 by erictapen · 0 comments
erictapen commented 2024-10-22 16:05:57 +00:00 (Migrated from github.com)

Whenever I'm changing code, I see this in the logs:

web     | INFO 2024-10-22 16:01:27,239 autoreload 1452674 139910547642176 /home/kerstin/git/nix-security-tracker/src/website/webview/views.py changed, reloading.
web     | INFO 2024-10-22 16:01:28,042 github_state 1452686 140607527307072 Syncing initial GitHub state.
web     | INFO 2024-10-22 16:01:28,042 utils 1452686 140607527307072 Using credentials directory: /home/kerstin/git/nix-security-tracker/.credentials
web     | INFO 2024-10-22 16:01:28,042 utils 1452686 140607527307072 Using GitHub Token to connect to the API.
web     | WARNING 2024-10-22 16:01:28,042 utils 1452686 140607527307072 No token available in the credentials directory, using unauthenticated API.
web     | INFO 2024-10-22 16:01:29,430 github_state 1452686 140607527307072 Retrieving Github IDs to update database groups...
web     | INFO 2024-10-22 16:01:30,349 github_state 1452686 140607527307072 Done updating database groups.
web     | INFO 2024-10-22 16:01:30,351 autoreload 1452686 140607527307072 Watching for file changes with StatReloader
web     | Performing system checks...
web     | 
web     | System check identified no issues (0 silenced).
web     | October 22, 2024 - 16:01:30
web     | Django version 4.2.16, using settings 'tracker.settings'
web     | Starting ASGI/Daphne version 4.1.2 development server at http://127.0.0.1:8000/
web     | Quit the server with CONTROL-C.
web     | INFO 2024-10-22 16:01:52,407 runserver 1452686 140607443961536 HTTP GET /suggestions/ 200 [16.45, 127.0.0.1:44736]

It takes 4-5 seconds on my machine. If this cycle would be more like 1-2 seconds, my development flow would have noticably less friction.

Whenever I'm changing code, I see this in the logs: ```console web | INFO 2024-10-22 16:01:27,239 autoreload 1452674 139910547642176 /home/kerstin/git/nix-security-tracker/src/website/webview/views.py changed, reloading. web | INFO 2024-10-22 16:01:28,042 github_state 1452686 140607527307072 Syncing initial GitHub state. web | INFO 2024-10-22 16:01:28,042 utils 1452686 140607527307072 Using credentials directory: /home/kerstin/git/nix-security-tracker/.credentials web | INFO 2024-10-22 16:01:28,042 utils 1452686 140607527307072 Using GitHub Token to connect to the API. web | WARNING 2024-10-22 16:01:28,042 utils 1452686 140607527307072 No token available in the credentials directory, using unauthenticated API. web | INFO 2024-10-22 16:01:29,430 github_state 1452686 140607527307072 Retrieving Github IDs to update database groups... web | INFO 2024-10-22 16:01:30,349 github_state 1452686 140607527307072 Done updating database groups. web | INFO 2024-10-22 16:01:30,351 autoreload 1452686 140607527307072 Watching for file changes with StatReloader web | Performing system checks... web | web | System check identified no issues (0 silenced). web | October 22, 2024 - 16:01:30 web | Django version 4.2.16, using settings 'tracker.settings' web | Starting ASGI/Daphne version 4.1.2 development server at http://127.0.0.1:8000/ web | Quit the server with CONTROL-C. web | INFO 2024-10-22 16:01:52,407 runserver 1452686 140607443961536 HTTP GET /suggestions/ 200 [16.45, 127.0.0.1:44736] ``` It takes 4-5 seconds on my machine. If this cycle would be more like 1-2 seconds, my development flow would have noticably less friction.
Sign in to join this conversation.
No description provided.