process-gpt-agent-sdk 0.3.5__tar.gz → 0.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of process-gpt-agent-sdk might be problematic. Click here for more details.
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/process_gpt_agent_sdk.egg-info/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/__init__.py +2 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/database.py +14 -1
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/processgpt_agent_framework.py +8 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/pyproject.toml +1 -1
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/README.md +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/process_gpt_agent_sdk.egg-info/dependency_links.txt +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/process_gpt_agent_sdk.egg-info/top_level.txt +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/utils.py +0 -0
- {process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/setup.cfg +0 -0
{process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/__init__.py
RENAMED
|
@@ -8,6 +8,7 @@ from .database import (
|
|
|
8
8
|
initialize_db,
|
|
9
9
|
get_consumer_id,
|
|
10
10
|
polling_pending_todos,
|
|
11
|
+
fetch_any_task,
|
|
11
12
|
record_event,
|
|
12
13
|
record_events_bulk,
|
|
13
14
|
save_task_result,
|
|
@@ -30,6 +31,7 @@ __all__ = [
|
|
|
30
31
|
"initialize_db",
|
|
31
32
|
"get_consumer_id",
|
|
32
33
|
"polling_pending_todos",
|
|
34
|
+
"fetch_any_task",
|
|
33
35
|
"record_event",
|
|
34
36
|
"record_events_bulk",
|
|
35
37
|
"save_task_result",
|
{process_gpt_agent_sdk-0.3.5 → process_gpt_agent_sdk-0.3.6}/processgpt_agent_sdk/database.py
RENAMED
|
@@ -81,7 +81,7 @@ def initialize_db() -> None:
|
|
|
81
81
|
if os.getenv("ENV") != "production":
|
|
82
82
|
load_dotenv()
|
|
83
83
|
supabase_url = os.getenv("SUPABASE_URL") or os.getenv("SUPABASE_KEY_URL")
|
|
84
|
-
supabase_key = os.getenv("SUPABASE_KEY") or os.getenv("SUPABASE_ANON_KEY")
|
|
84
|
+
supabase_key = os.getenv("SERVICE_ROLE_KEY") or os.getenv("SUPABASE_KEY") or os.getenv("SUPABASE_ANON_KEY")
|
|
85
85
|
if not supabase_url or not supabase_key:
|
|
86
86
|
raise RuntimeError("SUPABASE_URL 및 SUPABASE_KEY가 필요합니다")
|
|
87
87
|
_supabase_client = create_client(supabase_url, supabase_key)
|
|
@@ -147,6 +147,19 @@ async def polling_pending_todos(agent_orch: str, consumer: str) -> Optional[Dict
|
|
|
147
147
|
|
|
148
148
|
return await _async_retry(_call, name="polling_pending_todos", fallback=lambda: None)
|
|
149
149
|
|
|
150
|
+
async def fetch_any_task(limit: int = 1) -> Optional[Dict[str, Any]]:
|
|
151
|
+
"""테스트용: 아무 조건 없이 그냥 SELECT만"""
|
|
152
|
+
|
|
153
|
+
def _call():
|
|
154
|
+
client = get_db_client()
|
|
155
|
+
resp = client.rpc("fetch_any_task", {"p_limit": limit}).execute()
|
|
156
|
+
rows = resp.data or []
|
|
157
|
+
if not rows:
|
|
158
|
+
return None
|
|
159
|
+
return rows[0]
|
|
160
|
+
|
|
161
|
+
return await _async_retry(_call, name="fetch_any_task", fallback=lambda: None)
|
|
162
|
+
|
|
150
163
|
|
|
151
164
|
# ------------------------------ Events & Results ------------------------------
|
|
152
165
|
async def record_events_bulk(payloads: List[Dict[str, Any]]) -> None:
|
|
@@ -16,6 +16,7 @@ from a2a.types import TaskArtifactUpdateEvent, TaskState, TaskStatusUpdateEvent
|
|
|
16
16
|
from .database import (
|
|
17
17
|
initialize_db,
|
|
18
18
|
polling_pending_todos,
|
|
19
|
+
fetch_any_task,
|
|
19
20
|
record_events_bulk,
|
|
20
21
|
record_event,
|
|
21
22
|
save_task_result,
|
|
@@ -392,6 +393,13 @@ class ProcessGPTAgentServer:
|
|
|
392
393
|
try:
|
|
393
394
|
logger.info("🔍 [폴링 시작] 작업 대기 중... (agent_orch=%s)", self.agent_orch)
|
|
394
395
|
|
|
396
|
+
# 테스트: 조건 없이 레코드 확인
|
|
397
|
+
test_row = await fetch_any_task(limit=1)
|
|
398
|
+
if test_row:
|
|
399
|
+
logger.info("📋 [테스트 조회] 조건 없이 발견된 작업: ID=%s, status=%s, agent_mode=%s, draft=%s, draft_status=%s, agent_orch=%s, tenant_id=%s",
|
|
400
|
+
test_row.get('id'), test_row.get('status'), test_row.get('agent_mode'),
|
|
401
|
+
test_row.get('draft'), test_row.get('draft_status'), test_row.get('agent_orch'), test_row.get('tenant_id'))
|
|
402
|
+
|
|
395
403
|
row = await polling_pending_todos(self.agent_orch, get_consumer_id())
|
|
396
404
|
|
|
397
405
|
if row:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|