Reimplement the queue system to allow to run callbacks per gogs repositories.
This feature must be optional and configurable. By default must be disabled.
If enabled, the queue system must be separated by gogs repositories. So all repository will have the own fifo queue system which allows fot the callbacks to run independently from the other repositories.
Currently the queue implementation non parallel.
Reimplement the queue system to allow to run callbacks per gogs repositories.
This feature must be optional and configurable. By default must be disabled.
If enabled, the queue system must be separated by gogs repositories. So all repository will have the own fifo queue system which allows fot the callbacks to run independently from the other repositories.
Adds a configuration option to enable/disable parallel queue processing per repository (disabled by default)
Creates separate FIFO queues for each Gogs repository when enabled
Allows callbacks for different repositories to run independently
Maintains the current single-queue behavior when disabled
Persists queue state to disk for crash recovery
I'll update the code and test it before pushing the changes.
@fszontagh I'm starting work on this issue now!
I'll implement a multi-FIFO queue system that:
1. Adds a configuration option to enable/disable parallel queue processing per repository (disabled by default)
2. Creates separate FIFO queues for each Gogs repository when enabled
3. Allows callbacks for different repositories to run independently
4. Maintains the current single-queue behavior when disabled
5. Persists queue state to disk for crash recovery
I'll update the code and test it before pushing the changes.
The implementation is production-ready and backward compatible!
@fszontagh Implementation completed! ✅
I've successfully implemented the multi-FIFO queue system with per-repository parallel processing.
## What was implemented:
### 1. **Dual Operating Modes**
- **Single-queue mode (default)**: Original behavior - one global FIFO queue, jobs execute sequentially
- **Multi-queue mode**: Separate FIFO queue per repository - jobs from different repos run in parallel
### 2. **Configuration**
- Added `QUEUE_PARALLEL_PER_REPOSITORY` environment variable (default: `false`)
- Updated `.env.example` with the new configuration option
- Feature is disabled by default for backward compatibility
### 3. **Implementation Details**
- Modified `src/jobQueue.js` to support both modes
- Each repository gets its own FIFO queue in multi-queue mode
- Jobs from different repositories can execute simultaneously
- Each repository maintains strict FIFO order internally
- Queue state persisted to `queue.json` (supports both modes)
- Automatic cleanup of empty repository queues
- Crash recovery works for both modes
### 4. **Testing**
- Tested both single-queue and multi-queue modes
- Verified parallel execution across different repositories
- Verified FIFO order is maintained within each repository
- Confirmed queue persistence and recovery works correctly
### 5. **Documentation**
- Updated `README.md` with complete documentation
- Updated `CLAUDE.md` with architecture details
- Added queue file structure examples for both modes
- Documented benefits and use cases
## How to enable:
Add to `.env`:
```bash
QUEUE_PARALLEL_PER_REPOSITORY=true
```
## Commit:
- Commit: 9c5fbf1
- Pushed to main branch
The implementation is production-ready and backward compatible!
Currently the queue implementation non parallel.
Reimplement the queue system to allow to run callbacks per gogs repositories.
This feature must be optional and configurable. By default must be disabled.
If enabled, the queue system must be separated by gogs repositories. So all repository will have the own fifo queue system which allows fot the callbacks to run independently from the other repositories.
@fszontagh I'm starting work on this issue now!
I'll implement a multi-FIFO queue system that:
I'll update the code and test it before pushing the changes.
@fszontagh Implementation completed! ✅
I've successfully implemented the multi-FIFO queue system with per-repository parallel processing.
What was implemented:
1. Dual Operating Modes
2. Configuration
QUEUE_PARALLEL_PER_REPOSITORYenvironment variable (default:false).env.examplewith the new configuration option3. Implementation Details
src/jobQueue.jsto support both modesqueue.json(supports both modes)4. Testing
5. Documentation
README.mdwith complete documentationCLAUDE.mdwith architecture detailsHow to enable:
Add to
.env:Commit:
9c5fbf1The implementation is production-ready and backward compatible!