{"id":28629761,"url":"https://github.com/fibjs/fib-flow","last_synced_at":"2025-10-18T23:04:01.022Z","repository":{"id":266367513,"uuid":"898104724","full_name":"fibjs/fib-flow","owner":"fibjs","description":"a workflow management system built on fibjs, designed for orchestrating complex task dependencies and managing distributed task execution.","archived":false,"fork":false,"pushed_at":"2025-06-04T10:23:41.000Z","size":478,"stargazers_count":22,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T17:54:16.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fibjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-03T19:49:42.000Z","updated_at":"2025-06-04T10:23:43.000Z","dependencies_parsed_at":"2025-05-28T17:38:19.187Z","dependency_job_id":"8e999732-044f-4f3d-a696-a3d0ae3c62be","html_url":"https://github.com/fibjs/fib-flow","commit_stats":null,"previous_names":["fibjs/fib-dcron","fibjs/fib-flow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fibjs/fib-flow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Ffib-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Ffib-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Ffib-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Ffib-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fibjs","download_url":"https://codeload.github.com/fibjs/fib-flow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibjs%2Ffib-flow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259462578,"owners_count":22861514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T12:13:30.435Z","updated_at":"2025-10-18T23:03:55.969Z","avatar_url":"https://github.com/fibjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fib-flow\n\nA powerful workflow management system built on fibjs for orchestrating complex task dependencies and distributed task execution.\n\n## Key Features\n\n- **Workflow Management**: Parent-child task relationships, automatic state propagation\n- **Task Types**: Async tasks and cron jobs with priorities and delays\n- **State Management**: Comprehensive task lifecycle and state transitions\n- **Reliability**: Automatic retries, timeout protection, transaction safety\n- **Database Support**: SQLite/MySQL/PostgreSQL with flexible connection options\n- **Resource Management**: Load balancing and specialized worker support\n\n## Installation\n\n```bash\nfibjs --install fib-flow\n```\n\n## Quick Start\n\n```javascript\nconst { TaskManager } = require('fib-flow');\n\n// Initialize task manager (uses in-memory SQLite by default)\nconst taskManager = new TaskManager();\ntaskManager.db.setup();\n\n// Basic task handler\ntaskManager.use('sendEmail', async (task) =\u003e {\n    const { to, subject, body } = task.payload;\n    await sendEmail(to, subject, body);\n    return { sent: true };\n});\n\n// Handler with configuration\ntaskManager.use('processImage', {\n    handler: async (task) =\u003e {\n        const { path } = task.payload;\n        await processImage(path);\n        return { processed: true };\n    },\n    timeout: 120,      // 2 minutes timeout\n    max_retries: 2,    // Maximum 2 retries\n    retry_interval: 30 // 30 seconds retry interval\n});\n\n// Start processing\ntaskManager.start();\n\n// Add a task\ntaskManager.async('sendEmail', {\n    to: 'user@example.com',\n    subject: 'Hello',\n    body: 'World'\n});\n```\n\n## Documentation\n\n### Core Concepts\n- [Task States and Transitions](docs/core-concepts.md#task-states-and-transitions)\n- [Task Types](docs/core-concepts.md#task-types)\n- [Error Handling](docs/core-concepts.md#error-handling)\n- [Workflow Support](docs/workflow-guide.md)\n\n### Configuration \u0026 Setup\n- [Installation Guide](docs/installation.md)\n- [Database Configuration](docs/database-config.md)\n- [Task Handler System](docs/task-handler.md)\n\n### Reference\n- [API Documentation](docs/api-reference.md)\n- [Cron Syntax Guide](docs/cron-syntax.md)\n- [Usage Examples](docs/usage-examples.md)\n- [Common Use Cases](docs/use-cases.md)\n\n## Example Use Cases\n\n- Background Processing: File processing, report generation\n- Scheduled Tasks: Data synchronization, backups\n- Complex Workflows: Multi-step data pipelines\n- Distributed Systems: Task coordination across services\n\nFor detailed examples and implementation guides, see [Usage Examples](docs/usage-examples.md).\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibjs%2Ffib-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibjs%2Ffib-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibjs%2Ffib-flow/lists"}