Skip to main content

Python 기반 통합 배치 스케줄링 시스템

Project description

jobu (Job Unified)

Python 기반 통합 배치 스케줄링 시스템

요구사항: Python 3.12+

개요

RDB에 크론 정보를 저장하고, Dispatcher가 스케줄에 따라 Job을 생성하면 Worker가 실행하는 구조입니다.

[cron_jobs] --Dispatcher--> [job_executions] --Worker--> [Handler]

특징

  • Dispatcher/Worker 분리로 HA 구성 용이
  • 다중 DB 지원 (SQLite, PostgreSQL, MySQL)
  • 다중 DB 트랜잭션 지원 (@transactional(db1, db2))
  • 비즈니스 로직과 model/sql 분리
  • aiosql 기반 SQL 쿼리 관리
  • 비동기 커넥션풀 지원
  • Admin API로 크론/잡 관리

모듈

모듈 설명
admin 관리 API 및 모니터링 화면
database DB 커넥션풀, 트랜잭션 관리
dispatcher 크론 기반 Job 생성
worker Job 실행 워커풀

흐름: Admin에서 크론 등록 -> Dispatcher가 스케줄에 맞춰 Job 생성 -> Worker가 Job 실행

구조

jobu/
  config/       # 설정 파일
  database/     # DB 커넥션풀 (SQLite, PostgreSQL, MySQL)
  dispatcher/   # Job 생성
  worker/       # Job 실행
  admin/        # 관리 API
  docker/       # Docker 개발 환경

설치

pip install jobu

개발 환경 설치

# 가상환경 생성 및 활성화
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# 의존성 설치
pip install -r requirements.txt

실행

# Admin API
python -m uvicorn admin.main:app --reload --port 8080

# Dispatcher
python -m dispatcher.main

# Worker
python -m worker.main

# Docker (PostgreSQL, MySQL 개발환경)
cd docker && docker-compose up -d

관리자 페이지

URL 설명
http://localhost:8080/docs API 문서 (Swagger)
http://localhost:8080/crons 크론 관리 화면
http://localhost:8080/jobs 잡 이력 화면

개발 가이드

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jobu-0.1.0.tar.gz (40.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jobu-0.1.0-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

Details for the file jobu-0.1.0.tar.gz.

File metadata

  • Download URL: jobu-0.1.0.tar.gz
  • Upload date:
  • Size: 40.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for jobu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f7ea4115ba24d14de7f39f41f3017599883d4ace0366f4b5220c2b4e72b36c9b
MD5 5b4b7d8870eb7c1c0f725e376820c975
BLAKE2b-256 c8fdc827745e0e32d91a0c4a9d5c0b460775e0fbf726fd70e32c395ebf5f0aed

See more details on using hashes here.

File details

Details for the file jobu-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jobu-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for jobu-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 872acda5733cb117c7441963ca9c338af4cdf0ab82ead3b6dd736eaa5f96d791
MD5 caa066ec2441e9b8aea27d67899d2571
BLAKE2b-256 6c01a52eb80d483ec304cdbd0ad3b2f9057105ad89c6d5900018df86d0cc276a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page