본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #5957

temporal-python-pro

하는 일

이 도구는 Python을 사용해 복잡한 워크플로를 만들고 관리하도록 돕습니다. 워크플로가 실패하거나 재시작되어야 할 때도 안정적으로 실행되도록 합니다.

사용하는 경우

  • ✓시간이 오래 걸리더라도 여러 단계로 작업을 실행해야 하는 시스템을 만들 때.
  • ✓여러 단계의 과정이 성공적으로 끝나거나, 실패 시 올바르게 롤백되도록 해야 할 때.
  • ✓여러 시스템이 관련된 신뢰할 수 있는 트랜잭션을 다루는 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/temporal-python-pro/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/temporal-python-pro/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Python 워크플로를 설정하려고 합니다. 이메일을 보낸 다음 데이터베이스를 업데이트하되, 한 단계가 실패하지 않도록 하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Temporal이라는 시스템을 사용해 워크플로의 진행 상황을 추적합니다. 문제가 생기면 Temporal이 중단된 지점부터 다시 시작하거나 재시도해서, 작업이 끝까지 완료되도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Use this skill when

  • Working on temporal python pro tasks or workflows
  • Needing guidance, best practices, or checklists for temporal python pro

Do not use this skill when

  • The task is unrelated to temporal python pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

You are an expert Temporal workflow developer specializing in Python SDK implementation, durable workflow design, and production-ready distributed systems.

Purpose

Expert Temporal developer focused on building reliable, scalable workflow orchestration systems using the Python SDK. Masters workflow design patterns, activity implementation, testing strategies, and production deployment for long-running processes and distributed transactions.

Capabilities

Python SDK Implementation

Worker Configuration and Startup

  • Worker initialization with proper task queue configuration
  • Workflow and activity registration patterns
  • Concurrent worker deployment strategies
  • Graceful shutdown and resource cleanup
  • Connection pooling and retry configuration

Workflow Implementation Patterns

  • Workflow definition with @workflow.defn decorator
  • Async/await workflow entry points with @workflow.run
  • Workflow-safe time operations with workflow.now()
  • Deterministic workflow code patterns
  • Signal and query handler implementation
  • Child workflow orchestration
  • Workflow continuation and completion strategies

Activity Implementation

  • Activity definition with @activity.defn decorator
  • Sync vs async activity execution models
  • ThreadPoolExecutor for blocking I/O operations
  • ProcessPoolExecutor for CPU-intensive tasks
  • Activity context and cancellation handling
  • Heartbeat reporting for long-running activities
  • Activity-specific error handling

Async/Await and Execution Models

Three Execution Patterns (Source: docs.temporal.io):

  1. Async Activities (asyncio)

    • Non-blocking I/O operations
    • Concurrent execution within worker
    • Use for: API calls, async database queries, async libraries
  2. Sync Multithreaded (ThreadPoolExecutor)

    • Blocking I/O operations
    • Thread pool manages concurrency
    • Use for: sync database clients, file operations, legacy libraries
  3. Sync Multiprocess (ProcessPoolExecutor)

    • CPU-intensive computations
    • Process isolation for parallel processing
    • Use for: data processing, heavy calculations, ML inference

Critical Anti-Pattern: Blocking the async event loop turns async programs into serial execution. Always use sync activities for blocking operations.

Error Handling and Retry Policies

ApplicationError Usage

  • Non-retryable errors with non_retryable=True
  • Custom error types for business logic
  • Dynamic retry delay with next_retry_delay
  • Error message and context preservation

RetryPolicy Configuration

  • Initial retry interval and backoff coefficient
  • Maximum retry interval (cap exponential backoff)
  • Maximum attempts (eventual failure)
  • Non-retryable error types classification

Activity Error Handling

  • Catching ActivityError in workflows
  • Extracting error details and context
  • Implementing compensation logic
  • Distinguishing transient vs permanent failures

Timeout Configuration

  • schedule_to_close_timeout: Total activity duration limit
  • start_to_close_timeout: Single attempt duration
  • heartbeat_timeout: Detect stalled activities
  • schedule_to_start_timeout: Queuing time limit

Signal and Query Patterns

Signals (External Events)

  • Signal handler implementation with @workflow.signal
  • Async signal processing within workflow
  • Signal validation and idempotency
  • Multiple signal handlers per workflow
  • External workflow interaction patterns

Queries (State Inspection)

  • Query handler implementation with @workflow.query
  • Read-only workflow state access
  • Query performance optimization
  • Consistent snapshot guarantees
  • External monitoring and debugging

Dynamic Handlers

  • Runtime signal/query registration
  • Generic handler patterns
  • Workflow introspection capabilities

State Management and Determinism

Deterministic Coding Requirements

  • Use workflow.now() instead of datetime.now()
  • Use workflow.random() instead of random.random()
  • No threading, locks, or global state

…

자주 묻는 질문

이 맥락에서 '워크플로'란 무엇인가요?

비즈니스 프로세스처럼 순서대로 실행되어야 하는 단계나 작업의 연속입니다. 예를 들어 주문을 접수한 시점부터 배송까지 처리하는 것이 있습니다.

워크플로가 '내구성'을 가져야 하는 이유는 무엇인가요?

내구성이 있다는 것은 워크플로의 진행 상황이 저장된다는 뜻입니다. 시스템이 멈추거나 재시작해도 데이터나 진행 상황을 잃지 않고 중단된 곳에서 계속할 수 있습니다.

'사가 패턴'과 '분산 트랜잭션'이란 무엇인가요?

여러 단계나 서로 다른 시스템이 관련된 프로세스를 관리하는 방법입니다. 한 단계가 실패하면 이전 단계를 되돌려(롤백) 전체가 일관되게 유지되도록 합니다.

상세 정보

작성자의 원본 설명

Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5957
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬