From 0bb323bbff1823e0ac6d3d5a39d5d336d5cf849a Mon Sep 17 00:00:00 2001 From: v6ole Date: Wed, 10 Dec 2025 15:53:17 +0800 Subject: [PATCH] =?UTF-8?q?Enhance=20user=20role=20management=20and=20acce?= =?UTF-8?q?ss=20control=20in=20the=20application.=20Added=20user=20managem?= =?UTF-8?q?ent=20link=20in=20the=20navigation=20for=20admins.=20Updated=20?= =?UTF-8?q?login=20flow=20to=20redirect=20to=20Casdoor=20for=20authenticat?= =?UTF-8?q?ion.=20Improved=20logging=20for=20user=20actions=20and=20unauth?= =?UTF-8?q?orized=20access=20attempts.=20Adjusted=20role=20checks=20across?= =?UTF-8?q?=20various=20views=20to=20include=20'=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98'=20and=20'admin'=20for=20access=20permissions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__pycache__/app.cpython-312.pyc | Bin 4481 -> 4568 bytes app/app.py | 2 + app/logs/app.log | 60 + app/templates/base.html | 5 +- app/templates/login.html | 51 +- app/templates/users.html | 59 + app/views/__pycache__/auth.cpython-312.pyc | Bin 7810 -> 6864 bytes .../__pycache__/dashboard.cpython-312.pyc | Bin 10023 -> 10131 bytes app/views/__pycache__/device.cpython-312.pyc | Bin 16324 -> 16432 bytes app/views/__pycache__/history.cpython-312.pyc | Bin 7458 -> 7641 bytes app/views/__pycache__/manual.cpython-312.pyc | Bin 5591 -> 5699 bytes .../__pycache__/statistics.cpython-312.pyc | Bin 16264 -> 16372 bytes app/views/__pycache__/user.cpython-312.pyc | Bin 0 -> 4160 bytes .../__pycache__/work_order.cpython-312.pyc | Bin 20223 -> 20417 bytes app/views/auth.py | 20 +- app/views/dashboard.py | 3 +- app/views/device.py | 3 +- app/views/history.py | 6 +- app/views/manual.py | 3 +- app/views/statistics.py | 3 +- app/views/user.py | 56 + app/views/work_order.py | 6 +- uwsgi.log | 1067 +++++++++++++++++ uwsgi.pid | 2 +- 24 files changed, 1285 insertions(+), 61 deletions(-) create mode 100644 app/templates/users.html create mode 100644 app/views/__pycache__/user.cpython-312.pyc create mode 100644 app/views/user.py diff --git a/app/__pycache__/app.cpython-312.pyc b/app/__pycache__/app.cpython-312.pyc index 4e15bd03a3b88831874fc75697fd1f5ff2a59a66..8446e015c5e2a26f778c0992590981ed332a0553 100644 GIT binary patch delta 753 zcmZuuO=}ZD7@pZpOwDGqt0v8+qS$OUpLNYzTT!Hxnx>_AD0u2th`}AwZ8smzCQ2`U zfOzuIGJinv6w+J%fhk_R3YOG>w<374coGC>5-UCAU3lhwp7)veo!NP*9;o6cQS<{E z$CJ10XS-q)F7GD0tCg4;gTMlo+Ww$r#-Jk5r=6>7s_Mu$l3YjY=@cCkn7 z7`GypvKMXhC%$cITT%ha#R1k$0~w=-qYU{Jqad3_V{Rc2hj{F*2BBF5dj6vt6 zRiX<8sF0>G3pKJQWMGth5mq@IA@M-r<`nhd>kKj!+%XDQhB1$`l=S?MFe)`ru~e_) z6)J?7ZKv}t@ES^AJ)xcZpFPoULh!{3Hi#a43}?vO;1;|=0#a+O=YL|Or>@S9jU#j; zzRg<7POV(Ft7UzoRJ9z0U97O$EUSf@4cl>b>aXGA|9X_w+4R9F@ih4(T`Fjd&ohWK zNHa(9)e&W)JTXEBps#>TZnd#=QBkx0{UTW$(V=rTV_il>IQza>bjU^!)`_S)t4T delta 700 zcmZvZ&u;Dqh37f(RlC;q=tiUlFz*NeQ)Ny$s8(A6!C*7dJx!J zaJhPEPYmOgy?9?Y=1pYE_Cj4T6pX-^Y}HU<_u0{U%!q+D{S+B-4q5RoI}T6paYcg*;r>@&k6!cRBdV`C2##Egs0}kFGSy zf}C8SrjW-$+7&Kfm3|dcI7CHnfj;!EUpxy1WQidOXt@Aq#&(sYAUN_oB38L=mC9RN zctn7L3llK{Rei5YInwVx8?ooWSO1x+09C&+Nfk6mm8*SkroMp zOmZw2=(MYLD`OGTB&C1(5X-YBqhZK7ddC;Zt1Q04pfJD}BNAnZ0gfD`(;ylP*;7X& z|8}j^n`XzhR!Ipo_K~e0^sO%!I7ZSCWsi}2h|<5N)-aZT=3h?lYd);|9q;^$>vLRx cj@M branch=红水河支局, role=装维员 +2025-12-10 15:29:14 INFO: 用户信息已更新: 农远灵(19978825450) -> branch=电厂支局, role=装维员 +2025-12-10 15:30:20 INFO: 用户信息已更新: 韦矍森(19977899008) -> branch=交付中心, role=管理员 +2025-12-10 15:30:22 INFO: 用户 韦矍森(19977899008) 登出 +2025-12-10 15:30:32 INFO: 重定向到 Casdoor 授权页面 +2025-12-10 15:30:32 INFO: Casdoor 用户信息: {'sub': '92501c0e-db14-4def-8ded-cb8337d8acdb', 'iss': 'http://10.10.10.14:18000', 'aud': '8f323670e073612794ef', 'preferred_username': 'admin', 'name': 'Admin', 'email': 'voole@vip.qq.com', 'email_verified': True, 'picture': 'https://cdn.casbin.org/img/casbin.svg', 'phone': '18878797071'} +2025-12-10 15:30:32 INFO: 创建新用户: Admin(18878797071) +2025-12-10 15:30:32 INFO: 用户 Admin(18878797071) 通过 Casdoor 登录成功 +2025-12-10 15:30:32 INFO: 用户 Admin 访问仪表盘页面 +2025-12-10 15:32:06 INFO: 应用启动 +2025-12-10 15:32:06 INFO: 错误处理器初始化完成 diff --git a/app/templates/base.html b/app/templates/base.html index 6837586..4978de4 100755 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -35,7 +35,7 @@ {% endblock %} diff --git a/app/templates/users.html b/app/templates/users.html new file mode 100644 index 0000000..c5c8af7 --- /dev/null +++ b/app/templates/users.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% block content %} +
+

用户管理

+ + {% with messages = get_flashed_messages() %} + {% if messages %} +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
+ {% endif %} + {% endwith %} + +
+ + + + + + + + + + + + {% for user in users %} + + + + + + + + + + {% endfor %} + +
手机号姓名所属支局角色操作
{{ user.phone }}{{ user.name }} + + + + + +
+
+
+{% endblock %} + diff --git a/app/views/__pycache__/auth.cpython-312.pyc b/app/views/__pycache__/auth.cpython-312.pyc index d34786f76e5680da12d0d09b0ad6366628d6044b..1fc2c56e430fbbd3d0473164dcd17157601fb534 100644 GIT binary patch delta 854 zcmX|<&rcIk5Xbkm+wIQFO*VM(AXf-_A(8lI8+gfn-t3#%H{Y4rN0&DT8@`HS zh+|7k4(V&hKQ?3tX@HAlmREg`Ie0~Wi9Y6yvS*Jnz{5}qK6o-?cW0k2hOfi_j@!e};I?pgppO}=+#i99wEhUE zzlGCVQE7dAW3ra$uSK()k?dCEiFN-*W39En)|lN4WNEzm+JA>cou-lD>CvgFn}v~U z6Ib&yg^5u(2;_(a*%;X$_NhoU6;dNutls!&Bso14Lg)Tc@ zWo5Zg8H&t23eR0U}j1(K#YIyrGme$G1{44Gms2 zkMT00eeknc60j!P3kS_T!ahmw6B*96#3O&PZ`;q`{(kx?1=m{!yW26W1Cd6cn_`!# zz~K1rDb&!7BD`ri%XhL9*!H#OMf3;I?^RS4t1OpwoA%=I0OC9%h(Hx`n0BMxgTO3K z$TpWWqo69bLS-0=N!@j|=;JGvM(HVLT49FN(PC|Z`>|n?sD6pv@UljTZ3Yo8uoyZB zYf{(jIGPfJ9I97@f@uWdN^^7Io%AHat^BA|Hj5Bzvstlm8uk2#(|~_cA1Og5@r1;o zn&=uub#5kiNOTNeCmAffZVnZ@BXo}GhHe+!5mR=vX3;zgz|LAPp)Hwi+V$|h+@6;c vayw}4MBrAE%@{r>SKBd^wj$yP{3rGUm&&GES=O%5X_z^AI=Dp08Q1+E2u97Q delta 1586 zcmZ8geQXnD7{9mIcKuk_+perzH@0IRw8yr_kPWm!a579l*aj#JVp48gyS22vdQ2DTuktz~-|5Q9Z5^*Kltpf6WZ0ZUG}3aBU5#W^u~0*{ zuCX?)T8op+b=x&vUO&i)C7qgCmg4=riiBmYbZ7g)j;^i){+)Yw@9KQPzqeI~ace5ksGG{I&;D>ob=IY$9H$VLS zv-fERO}KaKt<1-hnG4f`Cp&sJd*PGJ*n*E%5fk=&)wMB$mWa|9ih29hXhcMs{kRmD z6$SePF{w8aU}dqKIN1#wHGQw5L^R`ZB^C_zX>4CW#d=yzGe!eyzane;pn{{MqO7(X zsG=EZ)xH4M^r2W#(eyDX8pt)K6}>FsSSZ$qp+n445cRkkWawMdC*m}Vl?DdlP+ky( z(_{yG)bJZs{w5dM^}~M}nX1~!_@%+A!AnC^Ln&{2y7t+$Yv+iadW!k6?W5Z#4}EW~ zUv^YY>>b~G*}3QtM|Lgq&I#YR?=J6N?5w?7G;K`_t!Zal zifj8hpLdt5Tjc6ejoqpJhf>{#Q-^y}^+%Stqs!d7RJnVJ^W3x7OeSynm+bperhO~S z{I_fmGT?IBAlYizj9N(8&}6~2RL24suNa!P;EkZVDTq4FBqh{-e*#A^P#_LO6Heo1 z`q6BK_2rgI{xOJX192OBk$3)#@dp!XnV0OxkOkA*nIAa0!#!7zD6VHR#LP4}V-VH7W>*{Q=71aD9$%cw*+ke(Y_EfZ>ljLN@ zo5=fiWqk)Ya~1JskoEv{QHaCPj?s%CdK~8+oOfFYa3J}(Hx*CFK80@8=T)l^;ZBa!|L;~A!54qxMG{1__rkwj< D1|_G@ diff --git a/app/views/__pycache__/dashboard.cpython-312.pyc b/app/views/__pycache__/dashboard.cpython-312.pyc index 29fadf45caf53891efedaba1edf1ddc0b546610e..188156b1c2716a199a6fecc5c0d6f0b570d354ed 100644 GIT binary patch delta 1206 zcmb`FO-vI(6vt|GH@_49`Ita>H!mkg9js+7*EbC7L3MtaSp%P_ulOPz5njq zZ)Zo;m#UhB_^K~!2v0pyYlKw?1%z&po2U=z_#RHNpiq*RL}xG!nQ$<(1_;w|eu;2u zJ3{o(WobapR#x@_1AEnti&BbaF==$4fCrrXyR?C6-G{3gv7qyLTf6K}SZ! zs$ttd)$PBk3+S?K{AYs{=8?P{2|ThdN1~a(Jcp9RNg*jd%o!(3xo+e`rVE~P0p*Bx zq)29@r(%`rFbg3ID@oWVu?#!G2$oqb@vJ37q#Nld#rFhGptIsJl)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^6YOInDpbghyi}|6(&S4cr{PeTu5pKk*2qQrw z)lL|O<(#PWXg%z0v>ivh0mwO^ZIWt?CDMobGN&1N1MR< z2ifd?Wl}u7VPn_%+HG3AmVTN&zxbUZH^AIV1 zVMRmpd=wWTsu2N14FC?Z7G>kyLny%)n6Ntj+lpEd{$vObHC7Bi_vq@xlbfGRe*M8Z zW*l4H^s%AuOhY~0OPEs5oJ_0z8e4;&M*Gax)hM_YB9L=ig?F@&*t9HrT_!yQeZTKEh?Xf4$5YYln~@cC*+rbZ6fulA kg1ClQg!mk>7x1@j<$-?XP+ua#Zt%%fFBC;Z+D;Aof7!$Or2qf` diff --git a/app/views/__pycache__/history.cpython-312.pyc b/app/views/__pycache__/history.cpython-312.pyc index cbb693295f4b1c6080611f8d332a3825ef59b0fd..826b765656bb2e475511ad5b6802ab7e465702d1 100644 GIT binary patch delta 2053 zcmcIkU2GIp6ux(Uc6VlW_NUwJ>~6Q+)>34lDA3ZP1=zL^*e=mT-WgNZRbQY@1BcK{yG@>K~-hMR&VDM=F8fp$Q2y>Ttetw{5~on17E}rqUZVcCL6tm zNx=eFZ2|6k{3Sa>7|w=7U>k1(*m=2Ig7vV zM}7tx)0)-b{qZn}iNhRpbKs&u5 zY{5Luh=U9dczD6XpFETUz(3>RX%D{*q(#9NS2K*W^Wh+P*&Z%b<>e&HdD zrfpIuXNwo4wnu{{?NZuHXg2sx4+D(`6Y=3BNz7lr1OEtMbhsm9I@XQbptsl2Jd z`4)@V>D!H+Mf@f<_ZxAe>7$_k_Aoj>As{>W|5Y;FsKB?DD@hrN2UHR&?*fqqo6jI4 zIoCq3$jOr-zgkDOu_2#eSHk8_i0sWNw!$oy*9qGpW`{G#Q8_e<42{L7R>cM&#q|2iCUw6Nk-a^+WcI`7wvwOZ{7E$@E5ymh#HEPod)a1SD)UPdGn8VK5#|d zm^7=dI074eUAdXcv2$0j%*moFAJ(TUR>3+xRV1zSba*RXLl?rQ@qzh4wTh!4@x0`U zrd6D*lQdn3jOD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RDI3yG=(67&bv~lUEWage#vL|} zlXPP2x&W_g4e+Vt&navpbeBQ{F zSUq1)w=&)fcsZ;%pRKs(i@98uRXi_bn8AH2k|AaaS*QdjQYmzkXNrcI$r~ls%vIKe zfXBgF;HjEfUvO7p^>C+Vg!Vup)YyiZFl1;&%q%RFf?Tr8t-=bgd@^(__7U#@zpap8 z+{7FEMr*jOHEgvG+|~we-U_`h@)Mb@>ymZ6l2*U`EA|UCQ8v&WaM&R{CWE>wsMa^Z+sUn*?diW^A z-p)>;)q5__N)PPztz)}ROAM*O&LYep*lfgi#jh9d^{>QG(%@>To&RO*ce!vYl!VLm zzjh(RIY(WrxM*gXjGAbNV|GC~41(XBwqMEz4RM->&l{SCXQ*qOZi~bnMyS6h*@k;h za7B4};=;sMpz~|jq3>L^+d{-OUG?nxSwfw4KstFgmFJQF@zQ>m`wK;VaXvf13b3AR LQ diff --git a/app/views/__pycache__/manual.cpython-312.pyc b/app/views/__pycache__/manual.cpython-312.pyc index 603ed44a8fb0c2bba819212b52130badca3d6116..bdf43ac932da617cc06b0affbaf1d7045ca1007e 100644 GIT binary patch delta 1349 zcmah|U1(HC6rQ>Ncklis*+lZYiAj@eHbj?g5`xwm2reNpv}zyvVB^}^U3arTGJ8`g z+>3o_wNSxwkct{mAEfO(uoco>c z%$$2>Gyd~<@J=A$L(Gx`Gx^c*&EQTcbl*hi0{#l+5W&~63)52cw1YmvblK)i&kBlI zH9e75rV*lxpIZg385OGnQ+?5h{A$I^h$w4v4Wl+M6C>La5=4b7RupUSo0JIXE29XV zSLpk^H1x|Olg4X>O;7l#ZVtJa_~5GC2bbiTq>q*K%$4kJQPGh^lvpcs?4r?UPUGjN z*%c5B;SVE6nnOo#Bjn1CT*Y5#c5g#Zh9kqTSAPwx(2tFu;%*tr_~qh|D0M`Pz~ zgJasKExM!AJ@&j%aCF$MMTSU(pf1!%Gl-XBFEnTdX@?1YAl4x`m(iN+nq_U9Np|p^ zJ=5Tu@RJ?|*Ea+YbPe7!`f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6>|R`x@`bXDXR&AD#BfK}u+S)un1p5pHp=cQ z<%b=DpA4^Q^Dsc@G!mn_Ttn_PLCP|o%x(Z3X^&#vUSo|5EQz4Yuw!I%OF|Th!fny> z-(TgMw|sTPXBU@$Ycx&qt}O%Cai{UY`qJXazK6I&f@Ex_=R+qexC6c^=6nB$tuA19JyA(_8S`!S2{$YM-J1v=K)H$(9w_ z5Uk9@y@QL*L)3n>wm3>xWJ9tt28-iq`ZoMx{1km1dJb(&zkzzgNNx%8CShon;h)c3 ZyPnCbXXbMK?0xvop^fgmopu__{{>hR$+rLi diff --git a/app/views/auth.py b/app/views/auth.py index 3ffdf5a..d8e8383 100755 --- a/app/views/auth.py +++ b/app/views/auth.py @@ -9,26 +9,10 @@ def init_auth_routes(app): @app.route('/login', methods=['GET', 'POST']) def login(): - # 如果已登录,直接跳转到仪表盘 + # 已登录直接进入仪表盘,否则跳转 Casdoor 登录 if current_user.is_authenticated: return redirect(url_for('dashboard')) - - # 检查是否启用了 Casdoor - casdoor_enabled = bool(app.config.get('CASDOOR_CLIENT_ID')) - - # 处理手机号登录 - if request.method == 'POST': - phone = request.form['phone'] - user = User.query.filter_by(phone=phone).first() - if user: - login_user(user) - app.logger.info(f'用户 {user.name}({user.phone}) 登录成功') - return redirect(url_for('dashboard')) - else: - app.logger.warning(f'登录失败:用户不存在 (手机号: {phone})') - flash('用户不存在') - - return render_template('login.html', casdoor_enabled=casdoor_enabled) + return redirect(url_for('casdoor_login')) @app.route('/casdoor/login') def casdoor_login(): diff --git a/app/views/dashboard.py b/app/views/dashboard.py index 80dcadc..df07ae4 100755 --- a/app/views/dashboard.py +++ b/app/views/dashboard.py @@ -9,7 +9,8 @@ def init_dashboard_routes(app): @app.route('/dashboard') @login_required def dashboard(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试访问仪表盘页面') flash('您没有权限访问此页面') return redirect(url_for('login')) diff --git a/app/views/device.py b/app/views/device.py index 4058fb6..5adfd8b 100755 --- a/app/views/device.py +++ b/app/views/device.py @@ -14,7 +14,8 @@ def init_device_routes(app): @app.route('/sync_offline_devices', methods=['POST']) @login_required def sync_offline_devices(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试同步离线设备') return jsonify({'success': False, 'message': '没有权限执行此操作'}) diff --git a/app/views/history.py b/app/views/history.py index c7ae213..23e9b74 100755 --- a/app/views/history.py +++ b/app/views/history.py @@ -7,7 +7,8 @@ def init_history_routes(app): @app.route('/history') @login_required def history(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试访问历史记录') flash('您没有权限访问此页面') return redirect(url_for('statistics')) @@ -110,7 +111,8 @@ def init_history_routes(app): @app.route('/history/') @login_required def history_detail(order_id): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试查看工单详情 {order_id}') flash('您没有权限访问此页面') return redirect(url_for('statistics')) diff --git a/app/views/manual.py b/app/views/manual.py index 0889b2d..8f15817 100755 --- a/app/views/manual.py +++ b/app/views/manual.py @@ -11,7 +11,8 @@ def init_manual_routes(app): @app.route('/manual', methods=['GET', 'POST']) @login_required def manual(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试访问手工故障单页面') flash('您没有权限访问此页面') return redirect(url_for('statistics')) diff --git a/app/views/statistics.py b/app/views/statistics.py index 4047b7c..eedbbb5 100755 --- a/app/views/statistics.py +++ b/app/views/statistics.py @@ -13,7 +13,8 @@ def init_statistics_routes(app): @app.route('/statistics') @login_required def statistics(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试访问统计页面') flash('您没有权限访问此页面') return redirect(url_for('login')) diff --git a/app/views/user.py b/app/views/user.py new file mode 100644 index 0000000..8e42cf0 --- /dev/null +++ b/app/views/user.py @@ -0,0 +1,56 @@ +from flask import render_template, request, redirect, url_for, flash +from flask_login import login_required, current_user +from scripts.models import db, User, Device + + +def init_user_routes(app): + def is_admin_user(): + """允许统计员/管理员或名称为 Admin 的用户管理账号""" + return current_user.role in ['统计员', '管理员', 'admin'] or current_user.name == 'Admin' + + @app.route('/users', methods=['GET']) + @login_required + def user_list(): + if not is_admin_user(): + app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试访问用户管理') + flash('您没有权限访问此页面') + return redirect(url_for('dashboard')) + + users = User.query.order_by(User.name).all() + branch_options = [b[0] for b in db.session.query(Device.branch).distinct().all() if b[0]] + role_options = ['统计员', '装维员', '管理员'] + + return render_template( + 'users.html', + users=users, + branch_options=branch_options, + role_options=role_options + ) + + @app.route('/users/', methods=['POST']) + @login_required + def update_user(phone): + if not is_admin_user(): + app.logger.warning(f'未授权访问:用户 {current_user.name} 尝试修改用户 {phone}') + flash('您没有权限执行此操作') + return redirect(url_for('dashboard')) + + user = User.query.filter_by(phone=phone).first() + if not user: + flash('用户不存在') + return redirect(url_for('user_list')) + + new_branch = request.form.get('branch', '').strip() + new_role = request.form.get('role', '').strip() + + if new_role and new_role not in ['统计员', '装维员', '管理员']: + flash('角色不合法') + return redirect(url_for('user_list')) + + user.branch = new_branch + user.role = new_role + db.session.commit() + app.logger.info(f'用户信息已更新: {user.name}({user.phone}) -> branch={user.branch}, role={user.role}') + flash('用户信息已更新') + return redirect(url_for('user_list')) + diff --git a/app/views/work_order.py b/app/views/work_order.py index 49cbeed..6b545e6 100755 --- a/app/views/work_order.py +++ b/app/views/work_order.py @@ -17,7 +17,8 @@ def init_work_order_routes(app): @app.route('/dispatch', methods=['GET', 'POST']) @login_required def dispatch(): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': flash('您没有权限访问此页面') return redirect(url_for('statistics')) @@ -283,7 +284,8 @@ def init_work_order_routes(app): @app.route('/receive/', methods=['GET', 'POST']) @login_required def receive_detail(work_order_id): - if current_user.role not in ['装维员', '统计员']: + allowed_roles = ['装维员', '统计员', '管理员', 'admin'] + if current_user.role not in allowed_roles and current_user.name != 'Admin': flash('您没有权限访问此页面') return redirect(url_for('statistics')) diff --git a/uwsgi.log b/uwsgi.log index 4d5dcf0..d5afd28 100644 --- a/uwsgi.log +++ b/uwsgi.log @@ -7,3 +7,1070 @@ [2025-12-10 15:06:50,638] INFO in history: 用户 韦矍森 访问历史记录页面 [2025-12-10 15:06:51,827] INFO in statistics: 用户 韦矍森 访问统计页面 [2025-12-10 15:06:54,693] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/auth.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/auth.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/auth.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1645321) +...gracefully killing workers... +Gracefully killing worker 2 (pid: 1645310)... +Gracefully killing worker 4 (pid: 1645317)... +Gracefully killing worker 3 (pid: 1645314)... +Gracefully killing worker 1 (pid: 1645307)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:09:44 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:09:45 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x79eb41aa3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:09:46,386] INFO in app: 应用启动 +[2025-12-10 15:09:46,388] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x79eb41aa3668 pid: 1664112 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1664112) +spawned uWSGI worker 1 (pid: 1664280, cores: 2) +spawned uWSGI worker 2 (pid: 1664282, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 3 (pid: 1664284, cores: 2) +spawned uWSGI worker 4 (pid: 1664289, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1664291) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/auth.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1664291) +...gracefully killing workers... +Gracefully killing worker 1 (pid: 1664280)... +Gracefully killing worker 4 (pid: 1664289)... +Gracefully killing worker 2 (pid: 1664282)... +Gracefully killing worker 3 (pid: 1664284)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:11:10 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:11:12 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7423892a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:11:12,511] INFO in app: 应用启动 +[2025-12-10 15:11:12,512] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7423892a3668 pid: 1666187 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1666187) +spawned uWSGI worker 1 (pid: 1666362, cores: 2) +spawned uWSGI worker 2 (pid: 1666365, cores: 2) +spawned uWSGI worker 3 (pid: 1666366, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 4 (pid: 1666371, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1666374) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[2025-12-10 15:11:12,561] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,624] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,668] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,690] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,710] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,735] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,759] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,779] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,803] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:12,830] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:16,526] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:11:16,550] WARNING in dashboard: 未授权访问:用户 New User - usp76h 尝试访问仪表盘页面 +[2025-12-10 15:14:09,766] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[2025-12-10 15:15:06,923] INFO in device: 用户 韦矍森 开始同步离线设备 +[2025-12-10 15:15:06,976] INFO in device: 同步完成:创建了 8 个工单,恢复了 7 个设备 +[2025-12-10 15:15:19,486] INFO in statistics: 用户 韦矍森 访问统计页面 +[2025-12-10 15:15:20,435] INFO in history: 用户 韦矍森 访问历史记录页面 +[2025-12-10 15:15:21,191] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[2025-12-10 15:15:42,272] INFO in auth: 用户 韦矍森(19977899008) 登出 +[2025-12-10 15:16:07,922] INFO in auth: 重定向到 Casdoor 授权页面 +[2025-12-10 15:16:22,984] INFO in auth: Casdoor 用户信息: {'sub': '798f4436-fbb6-45f4-bf0c-6e1cf4add605', 'iss': 'http://10.10.10.14:18000', 'aud': '8f323670e073612794ef', 'preferred_username': 'test', 'name': '韦矍森', 'email': 'voole@vip.qq.com', 'email_verified': True, 'picture': 'https://cdn.casbin.org/img/casbin.svg', 'phone': '19977899008'} +[2025-12-10 15:16:22,989] INFO in auth: 更新用户信息: 韦矍森(19977899008) +[2025-12-10 15:16:22,990] INFO in auth: 用户 韦矍森(19977899008) 通过 Casdoor 登录成功 +[2025-12-10 15:16:23,005] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[2025-12-10 15:16:43,340] INFO in history: 用户 韦矍森 访问历史记录页面 +[2025-12-10 15:16:44,147] INFO in statistics: 用户 韦矍森 访问统计页面 +[2025-12-10 15:17:08,791] INFO in history: 用户 韦矍森 访问历史记录页面 +[2025-12-10 15:17:12,490] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[2025-12-10 15:17:15,451] INFO in statistics: 用户 韦矍森 访问统计页面 +[2025-12-10 15:17:16,596] INFO in history: 用户 韦矍森 访问历史记录页面 +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1666374) +...gracefully killing workers... +Gracefully killing worker 2 (pid: 1666365)... +Gracefully killing worker 1 (pid: 1666362)... +Gracefully killing worker 3 (pid: 1666366)... +Gracefully killing worker 4 (pid: 1666371)... +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:22:24 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:22:26 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7554742a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +Traceback (most recent call last): + File "/home/v6ole/pyproject/4an/app/app.py", line 14, in + from views.user import init_user_routes +ModuleNotFoundError: No module named 'views.user' +unable to load app 0 (mountpoint='') (callable not found or import error) +*** no app loaded. going in full dynamic mode *** +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1675199) +spawned uWSGI worker 1 (pid: 1675360, cores: 2) +spawned uWSGI worker 2 (pid: 1675363, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 3 (pid: 1675367, cores: 2) +spawned uWSGI worker 4 (pid: 1675368, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 21 *** +spawned uWSGI http 1 (pid: 1675371) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/dashboard.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/dashboard.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/dashboard.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/dashboard.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1675371) +...gracefully killing workers... +Gracefully killing worker 1 (pid: 1675360)... +Gracefully killing worker 2 (pid: 1675363)... +Gracefully killing worker 3 (pid: 1675367)... +Gracefully killing worker 4 (pid: 1675368)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:25:07 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:25:09 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7af5c94a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:25:09,714] INFO in app: 应用启动 +[2025-12-10 15:25:09,715] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7af5c94a3668 pid: 1677835 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1677835) +spawned uWSGI worker 1 (pid: 1678004, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 2 (pid: 1678008, cores: 2) +spawned uWSGI worker 3 (pid: 1678009, cores: 2) +spawned uWSGI worker 4 (pid: 1678012, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1678015) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/history.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1678015) +...gracefully killing workers... +Gracefully killing worker 4 (pid: 1678012)... +Gracefully killing worker 2 (pid: 1678008)... +Gracefully killing worker 3 (pid: 1678009)... +Gracefully killing worker 1 (pid: 1678004)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:26:04 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:26:06 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x79240b2a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:26:06,732] INFO in app: 应用启动 +[2025-12-10 15:26:06,735] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x79240b2a3668 pid: 1679695 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1679695) +spawned uWSGI worker 1 (pid: 1679866, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 2 (pid: 1679870, cores: 2) +spawned uWSGI worker 3 (pid: 1679873, cores: 2) +spawned uWSGI worker 4 (pid: 1679874, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1679878) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1679878) +...gracefully killing workers... +Gracefully killing worker 3 (pid: 1679873)... +Gracefully killing worker 1 (pid: 1679866)... +Gracefully killing worker 2 (pid: 1679870)... +Gracefully killing worker 4 (pid: 1679874)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:01 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:03 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7830e52a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:27:03,836] INFO in app: 应用启动 +[2025-12-10 15:27:03,838] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7830e52a3668 pid: 1681578 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1681578) +spawned uWSGI worker 1 (pid: 1681763, cores: 2) +spawned uWSGI worker 2 (pid: 1681764, cores: 2) +spawned uWSGI worker 3 (pid: 1681769, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 4 (pid: 1681773, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1681776) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1681776) +...gracefully killing workers... +Gracefully killing worker 4 (pid: 1681773)... +Gracefully killing worker 2 (pid: 1681764)... +Gracefully killing worker 3 (pid: 1681769)... +Gracefully killing worker 1 (pid: 1681763)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:13 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:15 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7a3f048a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:27:15,804] INFO in app: 应用启动 +[2025-12-10 15:27:15,806] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7a3f048a3668 pid: 1683376 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1683376) +spawned uWSGI worker 1 (pid: 1683537, cores: 2) +spawned uWSGI worker 2 (pid: 1683540, cores: 2) +spawned uWSGI worker 3 (pid: 1683541, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 4 (pid: 1683544, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1683550) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/statistics.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/statistics.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/statistics.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/statistics.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1683550) +...gracefully killing workers... +Gracefully killing worker 2 (pid: 1683540)... +Gracefully killing worker 4 (pid: 1683544)... +Gracefully killing worker 1 (pid: 1683537)... +Gracefully killing worker 3 (pid: 1683541)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:32 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:34 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x708796aa3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:27:34,862] INFO in app: 应用启动 +[2025-12-10 15:27:34,864] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x708796aa3668 pid: 1684870 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1684870) +spawned uWSGI worker 1 (pid: 1685052, cores: 2) +spawned uWSGI worker 2 (pid: 1685055, cores: 2) +spawned uWSGI worker 3 (pid: 1685057, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 4 (pid: 1685060, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1685065) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/device.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/device.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/device.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/device.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1685065) +...gracefully killing workers... +Gracefully killing worker 2 (pid: 1685055)... +Gracefully killing worker 1 (pid: 1685052)... +Gracefully killing worker 3 (pid: 1685057)... +Gracefully killing worker 4 (pid: 1685060)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:51 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:27:53 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x77b83b6a3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:27:53,868] INFO in app: 应用启动 +[2025-12-10 15:27:53,870] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x77b83b6a3668 pid: 1686974 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1686974) +spawned uWSGI worker 1 (pid: 1687125, cores: 2) +spawned uWSGI worker 2 (pid: 1687129, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 3 (pid: 1687130, cores: 2) +spawned uWSGI worker 4 (pid: 1687135, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1687138) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[2025-12-10 15:28:44,890] INFO in dashboard: 用户 韦矍森 访问仪表盘页面 +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/views/work_order.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1687138) +...gracefully killing workers... +Gracefully killing worker 1 (pid: 1687125)... +Gracefully killing worker 2 (pid: 1687129)... +Gracefully killing worker 4 (pid: 1687135)... +Gracefully killing worker 3 (pid: 1687130)... +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:28:53 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:28:54 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x76dd86ea3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:28:54,930] INFO in app: 应用启动 +[2025-12-10 15:28:54,931] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x76dd86ea3668 pid: 1689177 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1689177) +spawned uWSGI worker 1 (pid: 1689343, cores: 2) +spawned uWSGI worker 2 (pid: 1689347, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 3 (pid: 1689348, cores: 2) +spawned uWSGI worker 4 (pid: 1689353, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1689355) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created +[2025-12-10 15:28:54,976] INFO in user: 用户信息已更新: 农远灵(19978825450) -> branch=红水河支局, role=装维员 +[2025-12-10 15:29:14,047] INFO in user: 用户信息已更新: 农远灵(19978825450) -> branch=电厂支局, role=装维员 +[2025-12-10 15:30:20,966] INFO in user: 用户信息已更新: 韦矍森(19977899008) -> branch=交付中心, role=管理员 +[2025-12-10 15:30:22,850] INFO in auth: 用户 韦矍森(19977899008) 登出 +[2025-12-10 15:30:32,227] INFO in auth: 重定向到 Casdoor 授权页面 +[2025-12-10 15:30:32,296] INFO in auth: Casdoor 用户信息: {'sub': '92501c0e-db14-4def-8ded-cb8337d8acdb', 'iss': 'http://10.10.10.14:18000', 'aud': '8f323670e073612794ef', 'preferred_username': 'admin', 'name': 'Admin', 'email': 'voole@vip.qq.com', 'email_verified': True, 'picture': 'https://cdn.casbin.org/img/casbin.svg', 'phone': '18878797071'} +[2025-12-10 15:30:32,311] INFO in auth: 创建新用户: Admin(18878797071) +[2025-12-10 15:30:32,312] INFO in auth: 用户 Admin(18878797071) 通过 Casdoor 登录成功 +[2025-12-10 15:30:32,322] INFO in dashboard: 用户 Admin 访问仪表盘页面 +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +gateway "uWSGI http 1" has been buried (pid: 1689355) +...gracefully killing workers... +Gracefully killing worker 1 (pid: 1689343)... +Gracefully killing worker 2 (pid: 1689347)... +Gracefully killing worker 3 (pid: 1689348)... +Gracefully killing worker 4 (pid: 1689353)... +[uwsgi-python-reloader] module/file /home/v6ole/pyproject/4an/app/app.py has been modified +worker 1 buried after 1 seconds +worker 2 buried after 1 seconds +worker 3 buried after 1 seconds +worker 4 buried after 1 seconds +binary reloading uWSGI... +chdir() to /home/v6ole/pyproject/4an +closing all non-uwsgi socket fds > 2 (max_fd = 1024)... +found fd 9 mapped to socket 0 (/home/v6ole/pyproject/4an/uwsgi.sock) +running /home/v6ole/pyproject/venv/bin/uwsgi +[uWSGI] getting INI configuration from /home/v6ole/pyproject/4an/app/uwsgi.ini +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:32:04 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 7 +probably another instance of uWSGI is running on the same address (0.0.0.0:18019). +bind(): Address already in use [core/socket.c line 769] +VACUUM: pidfile removed. +*** Starting uWSGI 2.0.31 (64bit) on [Wed Dec 10 15:32:06 2025] *** +compiled with version: 13.3.0 on 26 November 2025 03:29:52 +os: Linux-6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 +nodename: fnubserver +machine: x86_64 +clock source: unix +detected number of CPU cores: 22 +current working directory: /home/v6ole/pyproject/4an +writing pidfile to /home/v6ole/pyproject/4an/uwsgi.pid +detected binary path: /home/v6ole/pyproject/venv/bin/uwsgi +!!! no internal routing support, rebuild with pcre support !!! +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +chdir() to /home/v6ole/pyproject/4an/app +your processes number limit is 63617 +your memory page size is 4096 bytes + *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** +detected max file descriptor number: 1024 +lock engine: pthread robust mutexes +thunder lock: disabled (you can enable it with --thunder-lock) +uWSGI http bound on 0.0.0.0:18019 fd 6 +uwsgi socket 0 bound to UNIX address /home/v6ole/pyproject/4an/uwsgi.sock fd 9 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +Python version: 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0] +PEP 405 virtualenv detected: /home/v6ole/pyproject/venv +Set PythonHome to /home/v6ole/pyproject/venv +Python main interpreter initialized at 0x7936d4ea3668 +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +python threads support enabled +your server socket listen backlog is limited to 100 connections +your mercy for graceful operations on workers is 60 seconds +mapped 703440 bytes (686 KB) for 8 cores +*** Operational MODE: preforking+threaded *** +[2025-12-10 15:32:06,616] INFO in app: 应用启动 +[2025-12-10 15:32:06,618] INFO in error_handlers: 错误处理器初始化完成 +WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7936d4ea3668 pid: 1693159 (default app) +uWSGI running as root, you can use --uid/--gid/--chroot options +*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** +*** uWSGI is running in multiple interpreter mode *** +spawned uWSGI master process (pid: 1693159) +spawned uWSGI worker 1 (pid: 1693321, cores: 2) +spawned uWSGI worker 2 (pid: 1693324, cores: 2) +Python auto-reloader enabled +spawned uWSGI worker 3 (pid: 1693327, cores: 2) +spawned uWSGI worker 4 (pid: 1693328, cores: 2) +*** Stats server enabled on 127.0.0.1:9191 fd: 22 *** +spawned uWSGI http 1 (pid: 1693333) +unable to stat() uwsgi.reload, events will be triggered as soon as the file is created +unable to stat() true, events will be triggered as soon as the file is created diff --git a/uwsgi.pid b/uwsgi.pid index 7c939ba..74c464f 100644 --- a/uwsgi.pid +++ b/uwsgi.pid @@ -1 +1 @@ -1645179 +1693159