diff --git a/logs/app.log b/logs/app.log index 809ea46..dce860b 100644 --- a/logs/app.log +++ b/logs/app.log @@ -1897,3 +1897,6 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'meal_p 2025-10-13 07:50:22,407 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] 2025-10-13 07:56:50,939 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] 2025-10-13 08:01:21,495 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] +2025-10-17 23:09:02,391 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] +2025-10-17 23:11:02,368 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] +2025-10-17 23:17:26,078 INFO: 应用启动 [in /home/renjianbo/aitsc/config/base.py:82] diff --git a/logs/gunicorn.pid b/logs/gunicorn.pid index 242ccde..a427fae 100644 --- a/logs/gunicorn.pid +++ b/logs/gunicorn.pid @@ -1 +1 @@ -9312 +11425 diff --git a/logs/gunicorn_access.log b/logs/gunicorn_access.log index be57c47..28e803f 100644 --- a/logs/gunicorn_access.log +++ b/logs/gunicorn_access.log @@ -12193,3 +12193,71 @@ 66.132.153.134 - - [17/Oct/2025:14:14:33 +0800] "GET /favicon.ico HTTP/1.1" 404 207 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" 688 66.132.153.134 - - [17/Oct/2025:14:14:34 +0800] "GET /robots.txt HTTP/1.1" 404 207 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)" 693 34.77.161.183 - - [17/Oct/2025:16:07:37 +0800] "GET / HTTP/1.1" 200 1505892 "-" "python-requests/2.32.5" 568607 +185.224.128.17 - - [17/Oct/2025:23:06:39 +0800] "CONNECT example.com:80 HTTP/1.1" 404 207 "-" "-" 699 +127.0.0.1 - - [17/Oct/2025:23:09:06 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 412972 +127.0.0.1 - - [17/Oct/2025:23:09:17 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 223265 +123.139.94.45 - - [17/Oct/2025:23:09:25 +0800] "GET / HTTP/1.1" 200 1505873 "http://101.43.95.130:5002/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1500990 +123.139.94.45 - - [17/Oct/2025:23:09:26 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1015 +123.139.94.45 - - [17/Oct/2025:23:09:27 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 810 +127.0.0.1 - - [17/Oct/2025:23:10:06 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 413707 +127.0.0.1 - - [17/Oct/2025:23:10:15 +0800] "GET / HTTP/1.1" 200 1505873 "-" "curl/7.29.0" 181067 +127.0.0.1 - - [17/Oct/2025:23:11:05 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 663654 +127.0.0.1 - - [17/Oct/2025:23:11:12 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 255629 +127.0.0.1 - - [17/Oct/2025:23:11:19 +0800] "GET / HTTP/1.1" 200 1507909 "-" "curl/7.29.0" 229148 +123.139.94.45 - - [17/Oct/2025:23:11:26 +0800] "GET / HTTP/1.1" 200 1507909 "http://101.43.95.130:5002/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1457416 +123.139.94.45 - - [17/Oct/2025:23:11:27 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5324 +123.139.94.45 - - [17/Oct/2025:23:11:28 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 901 +123.139.94.45 - - [17/Oct/2025:23:12:40 +0800] "POST / HTTP/1.1" 200 1513604 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 26121489 +123.139.94.45 - - [17/Oct/2025:23:12:42 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5401 +123.139.94.45 - - [17/Oct/2025:23:12:43 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 904 +123.139.94.45 - - [17/Oct/2025:23:14:14 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1410938 +123.139.94.45 - - [17/Oct/2025:23:14:15 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5301 +123.139.94.45 - - [17/Oct/2025:23:14:16 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 817 +123.139.94.45 - - [17/Oct/2025:23:14:22 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1755639 +123.139.94.45 - - [17/Oct/2025:23:14:23 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1211 +123.139.94.45 - - [17/Oct/2025:23:14:24 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 792 +123.139.94.45 - - [17/Oct/2025:23:14:38 +0800] "GET / HTTP/1.1" 200 1507909 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 2220420 +123.139.94.45 - - [17/Oct/2025:23:14:39 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1207 +123.139.94.45 - - [17/Oct/2025:23:14:39 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1059 +54.208.119.170 - - [17/Oct/2025:23:16:00 +0800] "GET / HTTP/1.1" 200 1507909 "-" "got (https://github.com/sindresorhus/got)" 1869529 +127.0.0.1 - - [17/Oct/2025:23:17:32 +0800] "GET / HTTP/1.1" 200 174204 "-" "curl/7.29.0" 634247 +123.139.94.45 - - [17/Oct/2025:23:17:40 +0800] "GET / HTTP/1.1" 200 174204 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 564499 +123.139.94.45 - - [17/Oct/2025:23:17:41 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5329 +123.139.94.45 - - [17/Oct/2025:23:17:41 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 4692 +123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET / HTTP/1.1" 200 174204 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 941257 +123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET /static/js/interactions.js HTTP/1.1" 404 207 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 5188 +123.139.94.45 - - [17/Oct/2025:23:17:49 +0800] "GET /api/check-login HTTP/1.1" 200 115 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 1170 +123.139.94.45 - - [17/Oct/2025:23:17:52 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 490244 +123.139.94.45 - - [17/Oct/2025:23:17:54 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 466084 +123.139.94.45 - - [17/Oct/2025:23:17:55 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 116086 +123.139.94.45 - - [17/Oct/2025:23:17:56 +0800] "GET /api/templates/%E5%85%AC%E5%8A%A1%E5%91%98%E8%80%83%E8%AF%95 HTTP/1.1" 200 29843 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 177610 +123.139.94.45 - - [17/Oct/2025:23:17:58 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115376 +123.139.94.45 - - [17/Oct/2025:23:17:59 +0800] "GET /api/templates/%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 951 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 118062 +123.139.94.45 - - [17/Oct/2025:23:18:00 +0800] "GET /api/templates/%E5%95%86%E4%B8%9A%E8%90%A5%E9%94%80 HTTP/1.1" 200 2681 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 118846 +123.139.94.45 - - [17/Oct/2025:23:18:01 +0800] "GET /api/templates/%E6%99%BA%E6%85%A7%E5%9F%8E%E5%B8%82 HTTP/1.1" 200 1781 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 104533 +123.139.94.45 - - [17/Oct/2025:23:18:02 +0800] "GET /api/templates/%E6%8A%80%E6%9C%AF%E7%A0%94%E5%8F%91 HTTP/1.1" 200 8891 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115125 +123.139.94.45 - - [17/Oct/2025:23:18:04 +0800] "GET /api/templates/%E5%95%86%E4%B8%9A%E8%90%A5%E9%94%80 HTTP/1.1" 200 2681 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115204 +123.139.94.45 - - [17/Oct/2025:23:18:09 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115346 +123.139.94.45 - - [17/Oct/2025:23:18:09 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115363 +123.139.94.45 - - [17/Oct/2025:23:18:11 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114984 +123.139.94.45 - - [17/Oct/2025:23:18:14 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115233 +123.139.94.45 - - [17/Oct/2025:23:18:15 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115176 +123.139.94.45 - - [17/Oct/2025:23:19:01 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114453 +123.139.94.45 - - [17/Oct/2025:23:19:02 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 466278 +123.139.94.45 - - [17/Oct/2025:23:19:02 +0800] "GET /api/templates/%E5%88%9B%E6%84%8F%E8%AE%BE%E8%AE%A1 HTTP/1.1" 200 726 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114803 +123.139.94.45 - - [17/Oct/2025:23:19:03 +0800] "GET /api/templates/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91 HTTP/1.1" 200 18538 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115348 +123.139.94.45 - - [17/Oct/2025:23:19:05 +0800] "GET /api/templates/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C HTTP/1.1" 200 3561 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 115061 +123.139.94.45 - - [17/Oct/2025:23:19:06 +0800] "GET /api/templates/%E5%B8%82%E5%9C%BA%E8%90%A5%E9%94%80 HTTP/1.1" 200 1666 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114093 +123.139.94.45 - - [17/Oct/2025:23:19:08 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114110 +123.139.94.45 - - [17/Oct/2025:23:19:09 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114117 +123.139.94.45 - - [17/Oct/2025:23:19:09 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 114366 +123.139.94.45 - - [17/Oct/2025:23:19:10 +0800] "GET /api/templates/%E4%B8%93%E4%B8%9A%E6%9C%8D%E5%8A%A1 HTTP/1.1" 200 2702 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 112490 +123.139.94.45 - - [17/Oct/2025:23:19:10 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 104118 +123.139.94.45 - - [17/Oct/2025:23:19:12 +0800] "GET /api/templates/all HTTP/1.1" 200 217077 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 524874 +123.139.94.45 - - [17/Oct/2025:23:19:45 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117892 +123.139.94.45 - - [17/Oct/2025:23:19:59 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117654 +123.139.94.45 - - [17/Oct/2025:23:20:00 +0800] "GET /api/templates/%E4%BA%A7%E5%93%81%E7%AE%A1%E7%90%86 HTTP/1.1" 200 9044 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 119177 +123.139.94.45 - - [17/Oct/2025:23:20:42 +0800] "GET /api/templates/%E9%80%9A%E7%94%A8 HTTP/1.1" 200 1110 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 113853 +123.139.94.45 - - [17/Oct/2025:23:22:20 +0800] "GET /api/templates/%E4%BA%BA%E5%8A%9B%E8%B5%84%E6%BA%90 HTTP/1.1" 200 1662 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 117832 +123.139.94.45 - - [17/Oct/2025:23:22:28 +0800] "GET /api/templates/%E5%85%AC%E5%8A%A1%E5%91%98%E8%80%83%E8%AF%95 HTTP/1.1" 200 29843 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 171743 +123.139.94.45 - - [17/Oct/2025:23:22:44 +0800] "GET /api/templates/%E5%85%A8%E6%A0%88%E5%BC%80%E5%8F%91 HTTP/1.1" 200 9397 "http://101.43.95.130:5002/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0" 113009 diff --git a/logs/gunicorn_error.log b/logs/gunicorn_error.log index 7649bb5..6ebbe47 100644 --- a/logs/gunicorn_error.log +++ b/logs/gunicorn_error.log @@ -7402,3 +7402,69 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'meal_p [2025-10-17 14:35:42 +0800] [1842] [WARNING] Invalid request from ip=37.60.241.154: Invalid HTTP request line: 'SSH-2.0-OpenSSH' [2025-10-17 17:15:48 +0800] [17673] [WARNING] Invalid request from ip=88.214.50.115: Invalid HTTP request line: '\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie: mstshash=Administr' [2025-10-17 19:18:52 +0800] [17671] [WARNING] Invalid request from ip=79.124.49.210: Invalid HTTP request line: '\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie: mstshash=Administr' +[2025-10-17 23:09:04 +0800] [23219] [INFO] Starting gunicorn 21.2.0 +[2025-10-17 23:10:29 +0800] [1842] [INFO] Worker exiting (pid: 1842) +[2025-10-17 23:10:29 +0800] [1843] [INFO] Worker exiting (pid: 1843) +[2025-10-17 23:10:29 +0800] [17673] [INFO] Worker exiting (pid: 17673) +[2025-10-17 23:10:29 +0800] [9312] [INFO] Handling signal: term +[2025-10-17 23:10:29 +0800] [17671] [INFO] Worker exiting (pid: 17671) +[2025-10-17 23:10:29 +0800] [17674] [INFO] Worker exiting (pid: 17674) +[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:17673) was sent SIGTERM! +[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:1842) was sent SIGTERM! +[2025-10-17 23:10:29 +0800] [9312] [ERROR] Worker (pid:1843) was sent SIGTERM! +[2025-10-17 23:10:29 +0800] [9312] [INFO] Shutting down: Master +[2025-10-17 23:11:03 +0800] [16423] [INFO] Starting gunicorn 21.2.0 +[2025-10-17 23:11:03 +0800] [16423] [INFO] Gunicorn服务器启动中... +[2025-10-17 23:11:03 +0800] [16423] [INFO] Listening at: http://0.0.0.0:5002 (16423) +[2025-10-17 23:11:03 +0800] [16423] [INFO] Using worker: sync +[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:11:03 +0800] [16434] [INFO] Booting worker with pid: 16434 +[2025-10-17 23:11:03 +0800] [16434] [INFO] 工作进程 16434 已启动 +[2025-10-17 23:11:03 +0800] [16434] [INFO] 工作进程 16434 初始化完成 +[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:11:03 +0800] [16435] [INFO] Booting worker with pid: 16435 +[2025-10-17 23:11:03 +0800] [16435] [INFO] 工作进程 16435 已启动 +[2025-10-17 23:11:03 +0800] [16435] [INFO] 工作进程 16435 初始化完成 +[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:11:03 +0800] [16436] [INFO] Booting worker with pid: 16436 +[2025-10-17 23:11:03 +0800] [16436] [INFO] 工作进程 16436 已启动 +[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:11:03 +0800] [16436] [INFO] 工作进程 16436 初始化完成 +[2025-10-17 23:11:03 +0800] [16437] [INFO] Booting worker with pid: 16437 +[2025-10-17 23:11:03 +0800] [16437] [INFO] 工作进程 16437 已启动 +[2025-10-17 23:11:03 +0800] [16437] [INFO] 工作进程 16437 初始化完成 +[2025-10-17 23:11:03 +0800] [16423] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:11:03 +0800] [16438] [INFO] Booting worker with pid: 16438 +[2025-10-17 23:11:03 +0800] [16438] [INFO] 工作进程 16438 已启动 +[2025-10-17 23:11:03 +0800] [16438] [INFO] 工作进程 16438 初始化完成 +[2025-10-17 23:17:03 +0800] [16434] [INFO] Worker exiting (pid: 16434) +[2025-10-17 23:17:03 +0800] [16423] [INFO] Handling signal: term +[2025-10-17 23:17:03 +0800] [16435] [INFO] Worker exiting (pid: 16435) +[2025-10-17 23:17:03 +0800] [16436] [INFO] Worker exiting (pid: 16436) +[2025-10-17 23:17:03 +0800] [16437] [INFO] Worker exiting (pid: 16437) +[2025-10-17 23:17:03 +0800] [16438] [INFO] Worker exiting (pid: 16438) +[2025-10-17 23:17:04 +0800] [16423] [INFO] Shutting down: Master +[2025-10-17 23:17:26 +0800] [11425] [INFO] Starting gunicorn 21.2.0 +[2025-10-17 23:17:26 +0800] [11425] [INFO] Gunicorn服务器启动中... +[2025-10-17 23:17:26 +0800] [11425] [INFO] Listening at: http://0.0.0.0:5002 (11425) +[2025-10-17 23:17:26 +0800] [11425] [INFO] Using worker: sync +[2025-10-17 23:17:26 +0800] [11425] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:17:26 +0800] [11434] [INFO] Booting worker with pid: 11434 +[2025-10-17 23:17:26 +0800] [11434] [INFO] 工作进程 11434 已启动 +[2025-10-17 23:17:26 +0800] [11434] [INFO] 工作进程 11434 初始化完成 +[2025-10-17 23:17:26 +0800] [11425] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:17:26 +0800] [11435] [INFO] Booting worker with pid: 11435 +[2025-10-17 23:17:26 +0800] [11435] [INFO] 工作进程 11435 已启动 +[2025-10-17 23:17:26 +0800] [11435] [INFO] 工作进程 11435 初始化完成 +[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:17:27 +0800] [11439] [INFO] Booting worker with pid: 11439 +[2025-10-17 23:17:27 +0800] [11439] [INFO] 工作进程 11439 已启动 +[2025-10-17 23:17:27 +0800] [11439] [INFO] 工作进程 11439 初始化完成 +[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:17:27 +0800] [11440] [INFO] Booting worker with pid: 11440 +[2025-10-17 23:17:27 +0800] [11440] [INFO] 工作进程 11440 已启动 +[2025-10-17 23:17:27 +0800] [11440] [INFO] 工作进程 11440 初始化完成 +[2025-10-17 23:17:27 +0800] [11425] [INFO] 工作进程 [booting] 即将启动 +[2025-10-17 23:17:27 +0800] [11444] [INFO] Booting worker with pid: 11444 +[2025-10-17 23:17:27 +0800] [11444] [INFO] 工作进程 11444 已启动 +[2025-10-17 23:17:27 +0800] [11444] [INFO] 工作进程 11444 初始化完成 diff --git a/src/flask_prompt_master/routes/__pycache__/routes.cpython-312.pyc b/src/flask_prompt_master/routes/__pycache__/routes.cpython-312.pyc index beb7a12..f43b42d 100644 Binary files a/src/flask_prompt_master/routes/__pycache__/routes.cpython-312.pyc and b/src/flask_prompt_master/routes/__pycache__/routes.cpython-312.pyc differ diff --git a/src/flask_prompt_master/routes/routes.py b/src/flask_prompt_master/routes/routes.py index 6ca1488..ebc0819 100644 --- a/src/flask_prompt_master/routes/routes.py +++ b/src/flask_prompt_master/routes/routes.py @@ -177,13 +177,24 @@ def get_template_icon(category): @main_bp.route('/', methods=['GET', 'POST']) def index(): form = PromptForm() - templates = PromptTemplate.query.all() - # 获取所有可用的分类选项 - industries = sorted(set(t.industry for t in templates if t.industry)) - professions = sorted(set(t.profession for t in templates if t.profession)) - categories = sorted(set(t.category for t in templates if t.category)) - sub_categories = sorted(set(t.sub_category for t in templates if t.sub_category)) + # 获取所有模板用于分类选项 + all_templates = PromptTemplate.query.all() + + # 默认只显示"通用"分类的模板,提升加载性能 + templates = PromptTemplate.query.filter_by(category="通用").all() + + # 获取所有可用的分类选项(基于所有模板) + industries = sorted(set(t.industry for t in all_templates if t.industry)) + professions = sorted(set(t.profession for t in all_templates if t.profession)) + # 特殊处理分类排序,让"通用"分类排在第一位 + all_categories = sorted(set(t.category for t in all_templates if t.category)) + categories = [] + if "通用" in all_categories: + categories.append("通用") + all_categories.remove("通用") + categories.extend(all_categories) + sub_categories = sorted(set(t.sub_category for t in all_templates if t.sub_category)) if form.validate_on_submit(): template_id = request.form.get('template_id') @@ -231,6 +242,35 @@ def index(): professions=professions, categories=categories, sub_categories=sub_categories) +@main_bp.route('/api/templates/') +def get_templates_by_category(category): + """根据分类获取模板的API端点""" + if category == "all": + templates = PromptTemplate.query.all() + else: + templates = PromptTemplate.query.filter_by(category=category).all() + + # 将模板转换为字典格式 + template_list = [] + for template in templates: + template_dict = { + 'id': template.id, + 'name': template.name, + 'description': template.description, + 'category': template.category, + 'industry': template.industry, + 'profession': template.profession, + 'sub_category': template.sub_category, + 'system_prompt': template.system_prompt + } + template_list.append(template_dict) + + return jsonify({ + 'success': True, + 'templates': template_list, + 'count': len(template_list) + }) + @main_bp.route('/prompt/') def show_prompt(prompt_id): prompt = Prompt.query.get_or_404(prompt_id) diff --git a/src/flask_prompt_master/templates/generate.html b/src/flask_prompt_master/templates/generate.html index 39c86b2..229c548 100644 --- a/src/flask_prompt_master/templates/generate.html +++ b/src/flask_prompt_master/templates/generate.html @@ -57,9 +57,13 @@ @@ -2602,6 +2606,45 @@ .action-section { animation: slideInUp 0.6s ease-out 0.5s both; } + +/* 加载状态样式 */ +.loading-spinner { + text-align: center; + padding: 2rem; + color: #666; + font-size: 1.1rem; +} + +.loading-spinner::before { + content: ''; + display: inline-block; + width: 20px; + height: 20px; + border: 2px solid #f3f3f3; + border-top: 2px solid #007bff; + border-radius: 50%; + animation: spin 1s linear infinite; + margin-right: 10px; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.error-message { + text-align: center; + padding: 2rem; + color: #dc3545; + font-size: 1.1rem; +} + +.no-templates { + text-align: center; + padding: 2rem; + color: #666; + font-size: 1.1rem; +}