2.6.0 • Published 10 months ago

fib-flow v2.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

fib-flow

A powerful workflow management system built on fibjs for orchestrating complex task dependencies and distributed task execution.

Key Features

  • Workflow Management: Parent-child task relationships, automatic state propagation
  • Task Types: Async tasks and cron jobs with priorities and delays
  • State Management: Comprehensive task lifecycle and state transitions
  • Reliability: Automatic retries, timeout protection, transaction safety
  • Database Support: SQLite/MySQL/PostgreSQL with flexible connection options
  • Resource Management: Load balancing and specialized worker support

Installation

fibjs --install fib-flow

Quick Start

const { TaskManager } = require('fib-flow');

// Initialize task manager (uses in-memory SQLite by default)
const taskManager = new TaskManager();
taskManager.db.setup();

// Register task handler
taskManager.use('sendEmail', async (task) => {
    const { to, subject, body } = task.payload;
    await sendEmail(to, subject, body);
    return { sent: true };
});

// Start processing
taskManager.start();

// Add a task
taskManager.async('sendEmail', {
    to: 'user@example.com',
    subject: 'Hello',
    body: 'World'
});

Documentation

Core Concepts

Configuration & Setup

Reference

Example Use Cases

  • Background Processing: File processing, report generation
  • Scheduled Tasks: Data synchronization, backups
  • Complex Workflows: Multi-step data pipelines
  • Distributed Systems: Task coordination across services

For detailed examples and implementation guides, see Usage Examples.

License

MIT License

2.5.0

10 months ago

2.4.1

10 months ago

2.4.0

10 months ago

2.6.0

10 months ago

2.3.0

10 months ago

2.2.0

10 months ago

2.1.0

11 months ago

2.0.0

11 months ago

1.1.0

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago