Compare commits

...

2 Commits

Author SHA1 Message Date
Marsway beddeeb3ed update 2026-01-12 18:06:57 +08:00
Marsway e5dfb94318 update 2026-01-12 18:06:55 +08:00
23 changed files with 2662 additions and 60 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +0,0 @@
1
/var/lib/postgresql/data
1767598673
5432
/var/run/postgresql
*
742 0
ready

View File

@ -1,3 +0,0 @@
#

View File

@ -1,16 +0,0 @@
from __future__ import annotations
from app.integrations.base import BaseClient
class ExampleClient(BaseClient):
"""
演示用 Client真实业务中应封装 OA/HR/ERP API
这里不做实际外部请求仅保留结构与调用方式
"""
def ping(self) -> dict:
# 真实情况return self.get_json("/ping")
return {"ok": True}

View File

@ -1,33 +0,0 @@
from __future__ import annotations
import logging
from typing import Any
from app.jobs.base import BaseJob
from extensions.example.client import ExampleClient
logger = logging.getLogger("connecthub.extensions.example")
class ExampleJob(BaseJob):
job_id = "example.hello"
def run(self, params: dict[str, Any], secrets: dict[str, Any]) -> dict[str, Any]:
# params: 明文配置,例如 {"name": "Mars"}
name = params.get("name", "World")
# secrets: 解密后的明文,例如 {"token": "..."}
token = secrets.get("token", "<missing>")
client = ExampleClient(base_url="https://baidu.com", headers={"Authorization": f"Bearer {token}"})
try:
pong = client.ping()
finally:
client.close()
logger.info("ExampleJob ran name=%s pong=%s", name, pong)
return {"hello": name, "pong": pong}

View File

@ -248,6 +248,7 @@ class SyncOAToDidiLegalEntitySyncJob(BaseJob):
seeyon.close() seeyon.close()
payload = json.loads(raw) if raw else {} payload = json.loads(raw) if raw else {}
logger.info(payload)
outer = payload.get("data") or {} outer = payload.get("data") or {}
inner = outer.get("data") or {} inner = outer.get("data") or {}
inner2 = inner.get("data") or {} inner2 = inner.get("data") or {}