Skip to content

Commit 1472fa0

Browse files
authored
refactor: update addon for current best practises (#21)
* Remove unnecessary file: images/template-button.png * Remove 'ddev get' from README.md * README.md should not contain 'project is maintained' badge * README.md should contain badge: add-on registry * README.md should contain badge: last commit * README.md should contain badge: release * install.yaml should contain 'ddev_version_constraint * add ISSUE_TEMPLATES for GitHub * add PULL_REQUEST template for GitHub * .github/workflows/tests.yml should have 'paths-ignore' for markdown * docs: refresh and expand README
1 parent fd5643c commit 1472fa0

File tree

7 files changed

+141
-23
lines changed

7 files changed

+141
-23
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 🐞 Bug report or Support Request
2+
description: Create a report to help us improve.
3+
labels: [bug]
4+
body:
5+
- type: checkboxes
6+
attributes:
7+
label: Preliminary checklist
8+
description: Please complete the following checks before submitting an issue.
9+
options:
10+
- label: I am using the latest stable version of DDEV
11+
required: true
12+
- label: I am using the latest stable version of this add-on
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Expected Behavior
17+
description: What did you expect to happen?
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Actual Behavior
23+
description: What actually happened instead?
24+
validations:
25+
required: true
26+
- type: textarea
27+
attributes:
28+
label: Steps To Reproduce
29+
description: Specific steps to reproduce the behavior.
30+
placeholder: |
31+
1. In this environment...
32+
2. With this config...
33+
3. Run `...`
34+
4. See error...
35+
validations:
36+
required: false
37+
- type: textarea
38+
attributes:
39+
label: Anything else?
40+
description: |
41+
Links? References? Screenshots? Anything that will give us more context about your issue!
42+
43+
💡 Attach images or log files by clicking this area to highlight it and dragging files in.
44+
validations:
45+
required: false
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 🚀 Feature request
2+
description: Suggest an idea for this project.
3+
labels: [enhancement]
4+
body:
5+
- type: checkboxes
6+
attributes:
7+
label: Is there an existing issue for this?
8+
description: Please search existing issues to see if one already exists for your request.
9+
options:
10+
- label: I have searched the existing issues
11+
required: true
12+
- type: textarea
13+
attributes:
14+
label: Is your feature request related to a problem?
15+
description: Clearly and concisely describe the problem. (Ex. I'm always frustrated when...)
16+
validations:
17+
required: true
18+
- type: textarea
19+
attributes:
20+
label: Describe your solution
21+
description: Clearly and concisely describe what you want to happen.
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: Describe alternatives
27+
description: Clearly and concisely describe any alternative solutions or features you've considered.
28+
validations:
29+
required: false
30+
- type: textarea
31+
attributes:
32+
label: Additional context
33+
description: Add any other context or screenshots about the feature request.
34+
validations:
35+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## The Issue
2+
3+
- #<issue number>
4+
5+
<!-- Provide a brief description of the issue. -->
6+
7+
## How This PR Solves The Issue
8+
9+
## Manual Testing Instructions
10+
11+
```bash
12+
ddev add-on get https://github.com/tyler36/ddev-laravel-queue/tarball/<branch>
13+
ddev restart
14+
```
15+
16+
## Automated Testing Overview
17+
18+
<!-- Please describe the tests introduced by this PR, or explain why no tests are needed. -->
19+
20+
## Release/Deployment Notes
21+
22+
<!-- Does this affect anything else or have ramifications for other code? Does anything have to be done on deployment? -->

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: tests
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "**.md"
46
push:
57
branches: [ main ]
8+
paths-ignore:
9+
- "**.md"
610

711
schedule:
812
- cron: '01 07 * * *'

README.md

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,52 @@
1-
# tyler36/ddev-laravel-queue <!-- omit in toc -->
1+
[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)
2+
[![tests](https://github.com/tyler36/ddev-laravel-queue/actions/workflows/tests.yml/badge.svg)](https://github.com/tyler36/ddev-laravel-queue/actions/workflows/tests.yml)
3+
[![last commit](https://img.shields.io/github/last-commit/tyler36/ddev-laravel-queue)](https://github.com/tyler36/ddev-laravel-queue/commits)
4+
[![release](https://img.shields.io/github/v/release/tyler36/ddev-laravel-queue)](https://github.com/tyler36/ddev-laravel-queue/releases/latest)
25

3-
[![tests](https://github.com/tyler36/ddev-laravel-queue/actions/workflows/tests.yml/badge.svg)](https://github.com/tyler36/ddev-laravel-queue/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2026.svg)
6+
# DDEV Laravel Queue
47

5-
- [Introduction](#introduction)
6-
- [Getting Started](#getting-started)
7-
- [What does this add-on do and add?](#what-does-this-add-on-do-and-add)
8+
## Overview
89

9-
## Introduction
10+
This add-on runs a Laravel queue worker inside the DDEV web container.
11+
This add-on is recommended for `QUEUE_CONNECTION=database` environments.
1012

11-
This add-on allows you to start a Laravel queue worker through the DDEV web service. See [offical Queues documentation](https://laravel.com/docs/9.x/queues) for more details.
13+
See [official Queues documentation](https://laravel.com/docs/master/queues) for more details.
1214

13-
## Getting Started
14-
15-
This add-on requires DDEV v1.19.3 or higher.
16-
17-
- Install the DDEV laravel worker add-on:
18-
19-
For DDEV v1.23.5 or above run
15+
## Installation
2016

2117
```shell
2218
ddev add-on get tyler36/ddev-laravel-queue
19+
ddev restart
2320
```
2421

25-
For earlier versions of DDEV run
22+
After installation, make sure to commit the `.ddev` directory to version control.
2623

27-
```shell
28-
ddev get tyler36/ddev-laravel-queue
29-
```
24+
## Usage
3025

31-
Then restart the project
26+
The queue worker automatically runs as a background daemon inside the container. No configuration is required.
27+
To view queue worker output, check the web container logs.
3228

3329
```shell
34-
ddev restart
30+
$ ddev logs -s web
31+
...
32+
2025-09-19 09:12:23,817 INFO spawned: 'queue-1' with pid 1666
33+
2025-09-19 09:12:27,571 INFO success: queue-1 entered RUNNING state, process has stayed up for > than 3 seconds (startsecs)
34+
...
35+
2025-09-19 00:16:13 App\Events\TaskUpdated ....................................................................... RUNNING
36+
2025-09-19 00:16:13 App\Events\TaskUpdated ....................................................................... 73.82ms DONE
3537
```
3638

37-
## What does this add-on do and add?
39+
## Configuration
40+
41+
`.ddev/config.laravel-workers.yaml` starts the queue work daemon.
42+
It uses the following configuration settings:
43+
44+
- `--sleep=3` : This option tells the queue worker to sleep for 3 seconds between polling for new jobs when the queue is empty.
45+
- `--tries=3` : This option specifies that if a job fails, the worker should try to process the job up to three times before sending it to a failed—jobs storage.
46+
- `sleep 1` : After processing a job, the script pauses for 1 second before re—checking conditions in the loop; this reduces CPU usage by preventing the loop from running too aggressively .
47+
48+
To configure this add-on, remove `#ddev-generated` from `.ddev/config.laravel-workers.yaml` and edit the file as required.
3849

39-
1. Checks to make sure the DDEV version is adequate.
40-
2. Adds `.ddev/config.laravel-workers.yaml`, which starts the queue worker daemon.
50+
## Credits
4151

4252
**Contributed and maintained by [tyler36](https://github.com/tyler36)**

images/template-button.png

-89.6 KB
Binary file not shown.

install.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: ddev-laravel-queue
22

3+
ddev_version_constraint: '>= v1.24.3'
4+
35
# list of files and directories listed that are copied into project .ddev directory
46
project_files:
57
- config.laravel-workers.yaml

0 commit comments

Comments
 (0)