This commit is contained in:
2026-03-06 13:23:32 +08:00
parent 4ba636e98c
commit afb2b78c15
29 changed files with 76 additions and 1521 deletions

View File

@@ -1,4 +1,5 @@
import asyncio
import hashlib
import json
import logging
import os
@@ -51,8 +52,6 @@ class QingjianAPIClient:
if not customer_id:
return self.worker_id == 0
import hashlib
# 使用稳定的哈希算法分配客户
hash_val = int(hashlib.md5(str(customer_id).encode("utf-8")).hexdigest(), 16)
return (hash_val % self.worker_count) == self.worker_id