```
chore: enhance .gitignore and remove obsolete documentation files - Reorganize .gitignore with categorized sections for better maintainability - Add comprehensive ignore patterns for Python, Node.js, databases, logs, and build artifacts - Add project-specific ignore rules for coordinator, explorer, and deployment files - Remove outdated documentation: BITCOIN-WALLET-SETUP.md, LOCAL_ASSETS_SUMMARY.md, README-CONTAINER-DEPLOYMENT.md, README-DOMAIN-DEPLOYMENT.md ```
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from sqlmodel import select
|
||||
|
||||
from ..deps import require_admin_key
|
||||
from ..services import JobService, MinerService
|
||||
@@ -53,7 +54,7 @@ async def list_miners(session: SessionDep, admin_key: str = Depends(require_admi
|
||||
miner_service = MinerService(session)
|
||||
miners = [
|
||||
{
|
||||
"miner_id": record.miner_id,
|
||||
"miner_id": record.id,
|
||||
"status": record.status,
|
||||
"inflight": record.inflight,
|
||||
"concurrency": record.concurrency,
|
||||
|
||||
@@ -2,6 +2,7 @@ from fastapi import APIRouter, Depends, HTTPException, status
|
||||
|
||||
from ..deps import require_client_key
|
||||
from ..schemas import JobCreate, JobView, JobResult
|
||||
from ..types import JobState
|
||||
from ..services import JobService
|
||||
from ..storage import SessionDep
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ async def submit_result(
|
||||
duration_ms = int((datetime.utcnow() - job.requested_at).total_seconds() * 1000)
|
||||
metrics["duration_ms"] = duration_ms
|
||||
|
||||
receipt = receipt_service.create_receipt(job, miner_id, req.result, metrics)
|
||||
receipt = await receipt_service.create_receipt(job, miner_id, req.result, metrics)
|
||||
job.receipt = receipt
|
||||
job.receipt_id = receipt["receipt_id"] if receipt else None
|
||||
session.add(job)
|
||||
|
||||
@@ -20,9 +20,9 @@ class PartnerRegister(BaseModel):
|
||||
"""Register a new partner application"""
|
||||
name: str = Field(..., min_length=3, max_length=100)
|
||||
description: str = Field(..., min_length=10, max_length=500)
|
||||
website: str = Field(..., regex=r'^https?://')
|
||||
contact: str = Field(..., regex=r'^[^@]+@[^@]+\.[^@]+$')
|
||||
integration_type: str = Field(..., regex="^(explorer|analytics|wallet|exchange|other)$")
|
||||
website: str = Field(..., pattern=r'^https?://')
|
||||
contact: str = Field(..., pattern=r'^[^@]+@[^@]+\.[^@]+$')
|
||||
integration_type: str = Field(..., pattern="^(explorer|analytics|wallet|exchange|other)$")
|
||||
|
||||
|
||||
class PartnerResponse(BaseModel):
|
||||
@@ -36,7 +36,7 @@ class PartnerResponse(BaseModel):
|
||||
|
||||
class WebhookCreate(BaseModel):
|
||||
"""Create a webhook subscription"""
|
||||
url: str = Field(..., regex=r'^https?://')
|
||||
url: str = Field(..., pattern=r'^https?://')
|
||||
events: List[str] = Field(..., min_items=1)
|
||||
secret: Optional[str] = Field(max_length=100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user