modify: uv.lock

This commit is contained in:
2026-01-06 13:55:00 +08:00
parent 45bae10ceb
commit 14b3ea707f
11 changed files with 2290 additions and 43 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ error_log_handler.setFormatter(
logging.getLogger().addHandler(error_log_handler)
__title__ = "queue_sqlite"
__version__ = "0.2.1"
__version__ = "0.2.2"
__author__ = "chakcy"
__email__ = "947105045@qq.com"
__license__ = "MIT"
+8 -5
View File
@@ -12,11 +12,14 @@ from .standard import StandardQueueScheduler
from ._async import AsyncQueueScheduler
from .base import BaseScheduler
from ..model import MessageItem, SchedulerConfig
from typing import Callable, Literal
from typing import Callable, Literal, Dict
import logging
SCHEDULER_TYPES = {"standard": StandardQueueScheduler, "async": AsyncQueueScheduler}
SCHEDULER_TYPES: Dict[str, type[BaseScheduler]] = {
"standard": StandardQueueScheduler,
"async": AsyncQueueScheduler,
}
try:
from .qt import QtQueueScheduler
@@ -39,12 +42,12 @@ class QueueScheduler(BaseScheduler):
config: SchedulerConfig = SchedulerConfig(),
):
scheduler_class = SCHEDULER_TYPES.get(scheduler_type, None)
if not scheduler_class:
if scheduler_class is None:
raise ValueError(f"Invalid scheduler type: {scheduler_type}")
self.scheduler = scheduler_class(config)
if self.scheduler:
self.queue_operation = self.scheduler.queue_operation
# if self.scheduler:
# self.queue_operation = self.scheduler.queue_operation
def send_message(self, message: MessageItem, callback: Callable):
if not self.scheduler:
@@ -1,11 +1,15 @@
from abc import ABC, abstractmethod
from typing import Callable
from ...model import MessageItem, SchedulerConfig
from queue_sqlite_core import ShardedQueueOperation
class BaseScheduler(ABC):
"""调度器抽象类"""
@property
def queue_operation(self) -> ShardedQueueOperation: ...
def __init__(self, config: SchedulerConfig = SchedulerConfig()):
pass
@@ -21,7 +21,7 @@ class CleanupScheduler:
def __init__(
self,
queue_operation: ShardedQueueOperation,
interval_minutes=60,
interval_minutes=1,
remove_days=30,
):
self.queue_operation = queue_operation
+1 -1
View File
@@ -486,7 +486,7 @@ dependencies = [
[[package]]
name = "queue_sqlite_core"
version = "0.2.0"
version = "0.2.1"
dependencies = [
"chrono",
"pyo3",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "queue_sqlite_core"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+1432
View File
File diff suppressed because it is too large Load Diff