Skip to content
Descoped Source Code Portalv2.2.13
PollingSign in

Releases

11 releases kept
Up to date
  1. v0.4.4 Release v0.4.4

    descoped/async-task-workerGitHuboranheim

    Release Notes v0.4.4

    Release notes

    Release Notes v0.4.4

    ๐Ÿš€ New Features

    Cache Metadata Tracking

    • Added from_cache metadata field to all task responses and status objects
    • Tasks now indicate whether their results were served from cache (true) or freshly computed (false)
    • Available in all API endpoints: /api/v1/tasks, /api/v1/tasks/{task_id}, and task listings

    Enhanced Completion Callbacks

    • Updated completion callback signature to include cache metadata: (task_id, result, from_cache)
    • Backward compatibility maintained - existing callbacks without the from_cache parameter continue to work
    • Cache hits and fresh computations are now distinguishable in callback handlers

    ๐Ÿ”ง Improvements

    API Enhancements

    • All task response models now include the from_cache boolean field
    • Task serialization (.to_dict()) includes cache metadata
    • Consistent cache metadata across all task management operations

    Testing

    • Added comprehensive test coverage for cache metadata functionality
    • Tests verify cache metadata in both direct task execution and API responses
    • Ensures cache metadata is properly serialized and deserialized

    ๐Ÿ“ฆ Dependencies

    • Updated redis: 6.1.0 โ†’ 6.2.0

    ๐Ÿ”„ Breaking Changes

    None - This release maintains full backward compatibility with existing code.

    ๐Ÿ’ก Usage Examples

    Checking if a result came from cache:

    task_info = await worker.get_task_info(task_id)
    if task_info.from_cache:
        print("Result was served from cache")
    else:
        print("Result was freshly computed")
    

    Using the enhanced completion callback:

    async def on_task_complete(task_id: str, result: Any, from_cache: bool):
        if from_cache:
            logger.info(f"Cache hit for task {task_id}")
        else:
            logger.info(f"Fresh computation for task {task_id}")
    
    # Old callbacks still work:
    async def legacy_callback(task_id: str, result: Any):
        logger.info(f"Task {task_id} completed")
    

    API Response Example:

    {
      "id": "task-123",
      "status": "completed",
      "result": {"value": "computed_result"},
      "from_cache": true,
      "progress": 1.0,
      "metadata": {}
    }
    

    This release enhances observability and debugging capabilities while maintaining full backward compatibility with existing applications.

  2. v0.4.3 Release v0.4.3

    descoped/async-task-workerGitHuboranheim

    Cached Task Completion Callbacks

    Release notes

    Cached Task Completion Callbacks

    ๐Ÿš€ New Features

    • Completion callbacks for cached tasks: Cached results now trigger completion callbacks just like non-cached tasks
    • Improved cache key handling: Separated normal cache keys from task-specific entry IDs for better consistency

    ๐Ÿ”ง Changes

    • Added on_complete parameter to TaskExecutor.execute_task()
    • Enhanced cache key generation and invalidation logic
    • Added tests for cached task completion callbacks

    ๐Ÿ”„ Migration

    • Breaking behavioral change: Completion callbacks will now fire for cached tasks (previously they didn't)
    • If your code relies on completion callbacks only firing for non-cached tasks, you may need to adjust your logic
    • All other functionality remains backward compatible

    Files: executor.py, core.py, pool.py, test_task_worker.py

  3. v0.4.2 Release v0.4.2

    descoped/async-task-workerGitHuboranheim

    Fixed an issue with AsyncTaskWorker constructor, that should take CacheManager as argument.

    Release notes

    Fixed an issue with AsyncTaskWorker constructor, that should take CacheManager as argument.

  4. v0.4.1 Release v0.4.1

    descoped/async-task-workerGitHuboranheim

    (chore) Fixed typo in package name

    Release notes

    (chore) Fixed typo in package name

  5. v0.4.0 Release v0.4.0

    descoped/async-task-workerGitHuboranheim

    Add EventManager for Asynchronous Event Handling

    Release notes

    Add EventManager for Asynchronous Event Handling

    This release introduces a new module for asynchronous event handling and Server-Sent Events (SSE) support:

    New Features

    • EventManager: A generic pub/sub event system with filtering capabilities
    • GroupFilter: Filter for matching events by group ID
    • SSEClient: Client for consuming Server-Sent Events
    • Reactive Event Subscriptions: Modern API for subscribing to events with structured concurrency

    Documentation

    • Added sequence diagram for EventManager
    • Extended README with comprehensive event system documentation
    • Included example code for integrating with web applications

    Integration

    • Seamless integration with AsyncTaskWorker for task status event publishing
    • Comprehensive test suite demonstrating event-driven patterns

    This enhancement enables building reactive systems with real-time notifications, historical event access, and filtered event streams.

  6. v0.3.2 Release v0.3.2

    descoped/async-task-workerGitHuboranheim

    Add method to retrieve cache adapter instance.

    Release notes

    Add method to retrieve cache adapter instance.

  7. v0.3.1 Release v0.3.1

    descoped/async-task-workerGitHuboranheim

    Enhance AsyncTaskWorker cache management**

    Release notes

    Enhance AsyncTaskWorker cache management

    • Extend cache manager interface with more flexible caching options
    • Add support for custom cache key generation and task ID tracking
    • Implement fallback cache invalidation strategies
    • Add direct task ID cache retrieval method
    • Improve error handling and logging for cache operations
  8. v0.3.0 Release v0.3.0

    descoped/async-task-workerGitHuboranheim

    Overhaul cache system with key generation, async packaging, and thread safety**

    Release notes

    Overhaul cache system with key generation, async packaging, and thread safety

    • Add flexible cache key generation with composable functions and metadata support
    • Implement task ID to cache key mapping for reverse lookups
    • Add automatic cleanup of stale mappings to prevent memory leaks
    • Improve error handling during shutdown sequence
    • Include comprehensive tests for new functionality
    • Refactor cache module to package async_cache
    • Fixed thread safety with dict locks in async_cache
  9. v0.2.0 Release v0.2.0

    descoped/async-task-workerGitHuboranheim

    Refactor AsyncTaskWorker into modular component system**

    Release notes

    Refactor AsyncTaskWorker into modular component system

    This commit refactors the AsyncTaskWorker into a more modular, maintainable architecture.

    Key changes include:

    • Update README.md
    • Split monolithic task_worker.py into specialized component modules
    • Improve error handling with structured error categories and types
    • Enhanced task cancellation with better queue state management
    • Replace pickle serialization with more secure msgpack implementation
    • Add improved progress tracking with throttling mechanism
    • Update task_worker_api to use async pattern consistently
    • Make task registry thread-safe with proper locking
    • Update tests to match the new architecture
    • Add comprehensive documentation for all components

    The refactoring maintains API compatibility while improving internal structure, making the codebase easier to maintain and extend.

  10. v0.1.1 Release v0.1.1

    descoped/async-task-workerGitHuboranheim

    Fixed wheel build configuration.

    Release notes

    Fixed wheel build configuration.

  11. v0.1.0 Initial release v0.1.0

    descoped/async-task-workerGitHuboranheim

    Features**

    Release notes

    Features

    • Asynchronous Execution: Built on Python's asyncio for efficient concurrent task processing
    • Priority Queuing: Tasks can be assigned priorities for execution order control
    • Task Tracking: Comprehensive status monitoring and progress reporting
    • Cancellation Support: Ability to cancel running or pending tasks
    • Result Caching: Optional caching system with time-to-live (TTL) and size limits
    • Progress Reporting: Built-in callback mechanism for task progress updates
    • Flexible Design: Customizable cache adapters and task registration
    • Concurrent Task Processing: Run multiple asynchronous tasks concurrently
    • Status Tracking: Monitor task status, progress, and results
    • Task Registry: Register task handlers by type