Skip to content

Commit 1f0001d

Browse files
sonus21Sonu Kumar
and
Sonu Kumar
authored
Gh page using action
* github page * run on pull * use pages file only * pr * pr * update doc and handling * version issue * update action * two step * unknown job * artifact github-pages * use * use older version * v2 * change the folder * v2 --------- Co-authored-by: Sonu Kumar <sonu@git>
1 parent 04d88c5 commit 1f0001d

File tree

12 files changed

+31
-62
lines changed

12 files changed

+31
-62
lines changed

.github/workflows/pages.yaml

+17-23
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ on:
1010
# Runs on pushes targeting the default branch
1111
push:
1212
branches: [ $default-branch ]
13+
paths:
14+
- "docs/**"
1315
pull_request:
1416
branches: [ 'main', '2.x' ]
1517
types: [ opened ]
18+
paths:
19+
- "docs/**"
1620

1721
# Allows you to run this workflow manually from the Actions tab
1822
workflow_dispatch:
@@ -33,6 +37,9 @@ jobs:
3337
# Build and Deploy job
3438
build_and_deploy:
3539
runs-on: ubuntu-latest
40+
defaults:
41+
run:
42+
working-directory: docs
3643
steps:
3744
- name: Checkout
3845
uses: actions/checkout@v4
@@ -42,33 +49,20 @@ jobs:
4249
ruby-version: '3.1' # Not needed with a .ruby-version file
4350
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4451
cache-version: 0 # Increment this number if you need to re-download cached gems
52+
working-directory: '${{ github.workspace }}/docs'
53+
- name: Setup Pages
54+
id: pages
55+
uses: actions/configure-pages@v4
4556
- name: Bundle install in docs folder
46-
run: |
47-
cd docs
48-
bundle install
57+
run: bundle install
4958
- name: Build Jekyll site
50-
run: |
51-
cd docs
52-
bundle exec jekyll build --baseurl /rqueue
53-
mkdir -p _site # Ensure _site directory exists
59+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
5460
env:
5561
JEKYLL_ENV: production
56-
- name: Verify _site directory
57-
run: |
58-
cd docs
59-
ls -l _site
6062
- name: Upload artifact
61-
# Automatically uploads an artifact from the './_site' directory by default
62-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-pages-artifact@v2
6364
with:
64-
name: Jekyll site
65-
path: docs/_site
65+
path: 'docs/_site/'
6666
- name: Deploy to GitHub Pages
67-
uses: JamesIves/[email protected] # Replace with the appropriate deploy action
68-
with:
69-
branch: $default-branch
70-
folder: docs/_site
71-
cname: sonus21.github.io
72-
env:
73-
JEKYLL_ENV: production
74-
BASE_URL: /rqueue
67+
id: deployment
68+
uses: actions/deploy-pages@v3

docs/.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.0

docs/Gemfile.lock

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ GEM
9292

9393
PLATFORMS
9494
arm64-darwin-21
95+
arm64-darwin-23
9596
x86_64-linux
9697

9798
DEPENDENCIES

docs/_includes/footer_custom.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright &copy; 2019-{{ "now" | date: "%Y" }} Sonu Kumar. Distributed by an <a href="https://github.com/sonus21/rqueue/tree/main/LICENSE">Apache 2.0 license.</a>
1+
Copyright &copy; 2019-{{ "now" | date: "%Y" }} Sonu Kumar. Distributed by an <a href="https://github.com/sonus21/rqueue/tree/main/LICENSE">Apache 2.0 license.</a> Build on {{ "now" | date:"%Y-%m-%d %H:%M" }}

docs/configuration/configuration.md

-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ configuration or directly in the code.
1515

1616
{: .fs-6 .fw-300 }
1717

18-
## Table of contents
19-
20-
{: .no_toc .text-delta }
21-
22-
1. TOC
23-
{:toc}
24-
2518
---
2619
Apart from the basic configuration, Rqueue can be heavily customized, such as adjusting the number
2720
of tasks executed concurrently. Additional configurations can be provided using

docs/configuration/retry-and-backoff.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ the `SimpleRqueueListenerContainerFactory`. The default back-off time is 5 secon
1818

1919
In scenarios where you don't want Rqueue to retry failures, you can handle this in two ways:
2020

21-
1. **Using `RqueueListener` Annotation**: Add exceptions to the `doNotRetry` list within
21+
- **Using `RqueueListener` Annotation**: Add exceptions to the `doNotRetry` list within
2222
the `RqueueListener` annotation. This instructs Rqueue not to retry for specific exceptions.
23+
2324
```java
2425

2526
public class MessageListener{
@@ -30,7 +31,8 @@ public class MessageListener{
3031

3132
}
3233
```
33-
2. **Returning `-2` from Execution Backoff Method**: Alternatively, you can return `-2` from the
34+
35+
- **Returning `-1` from Execution Backoff Method**: Alternatively, you can return `-1` from the
3436
execution backoff method. This signals Rqueue to stop any further retry attempts for the failed
3537
message.
3638

docs/dashboard.md

+4
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,21 @@ prefix: [http://localhost:8080/my-application/rqueue](http://localhost:8080/my-a
8484
### Dashboard Screenshots
8585

8686
#### Latency Graph
87+
<br/>
8788

8889
[![Latency Graph](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/stats-graph.png)](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/stats-graph.png)
8990

9091
#### Queue Statistics
92+
<br/>
9193

9294
[![Queue Statistics](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/queues.png)](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/queues.png)
9395

9496
#### Tasks Waiting for Execution
97+
<br/>
9598

9699
[![Tasks Waiting for Execution](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/queue-explore.png)](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/queue-explore.png)
97100

98101
#### Running Tasks
102+
<br/>
99103

100104
[![Running Tasks](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/running-tasks.png)](https://raw.githubusercontent.com/sonus21/rqueue/master/docs/static/running-tasks.png)

docs/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ frameworks.
4040
* **Queue Priority**: Supports both group-level and sub-queue level priorities.
4141
* **Long Execution Jobs**: Check-in mechanism for long-running jobs.
4242
* **Execution Backoff**: Supports exponential and fixed backoff strategies.
43-
* **Do not retry**: Supports do not retry exceptions.
43+
* **Do not retry**: Supports do not retry strategy.
4444
* **Middleware**: Allows integration of middleware to intercept messages before processing.
4545
* **Callbacks**: Supports callbacks for handling dead letter queues and discarding messages.
4646
* **Events**: Provides bootstrap and task execution events.
@@ -304,6 +304,7 @@ the [GitHub repository][Rqueue repo] or contact the maintainers directly.
304304
{: .fs-5 }
305305

306306
Rqueue is licensed under the Apache License 2.0. See the [LICENSE](https://github.com/sonus21/rqueue/blob/master/LICENSE) file for more details.
307+
307308
[Rqueue Docs]: https://github.com/sonus21/rqueue/wiki
308309
[Boot Maven Central]: https://search.maven.org/artifact/com.github.sonus21/rqueue-spring-boot-starter
309310
[Maven Central]: https://search.maven.org/artifact/com.github.sonus21/rqueue-spring

rqueue-core/src/main/java/com/github/sonus21/rqueue/listener/PostProcessingHandler.java

+1-16
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ void handle(JobImpl job,
8181
case IGNORED:
8282
handleIgnoredMessage(job, failureCount);
8383
break;
84-
case FAILED_IGNORED:
85-
handleFailedIgnoredMessage(job, failureCount);
86-
break;
8784
case OLD_MESSAGE:
8885
handleOldMessage(job, job.getRqueueMessage());
8986
break;
@@ -283,7 +280,7 @@ private int getMaxRetryCount(RqueueMessage rqueueMessage, QueueDetail queueDetai
283280

284281
private void handleFailure(JobImpl job, int failureCount, Throwable throwable) {
285282
if (job.getQueueDetail().isDoNotRetryError(throwable)) {
286-
handleFailedIgnoredMessage(job, failureCount);
283+
handleRetryExceededMessage(job, failureCount, throwable);
287284
} else {
288285
int maxRetryCount = getMaxRetryCount(job.getRqueueMessage(), job.getQueueDetail());
289286
if (failureCount < maxRetryCount) {
@@ -292,8 +289,6 @@ private void handleFailure(JobImpl job, int failureCount, Throwable throwable) {
292289
throwable);
293290
if (delay == TaskExecutionBackOff.STOP) {
294291
handleRetryExceededMessage(job, failureCount, throwable);
295-
} else if (delay == TaskExecutionBackOff.DO_NOT_RETRY) {
296-
handleFailedIgnoredMessage(job, failureCount);
297292
} else {
298293
parkMessageForRetry(job, null, failureCount, delay);
299294
}
@@ -312,14 +307,4 @@ private void handleIgnoredMessage(JobImpl job, int failureCount) {
312307
job.getQueueDetail().getName());
313308
deleteMessage(job, MessageStatus.IGNORED, failureCount);
314309
}
315-
316-
private void handleFailedIgnoredMessage(JobImpl job, int failureCount) {
317-
log(
318-
Level.DEBUG,
319-
"Message {} failed & ignored, Queue: {}",
320-
null,
321-
job.getRqueueMessage(),
322-
job.getQueueDetail().getName());
323-
deleteMessage(job, MessageStatus.DISCARDED, failureCount);
324-
}
325310
}

rqueue-core/src/main/java/com/github/sonus21/rqueue/listener/RqueueExecutor.java

-5
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,10 @@ private boolean shouldRetry(long maxProcessingTime, int retryCount, int failureC
286286
boolean doNoRetry = queueDetail.isDoNotRetryError(error);
287287
// it should not be retried based on the exception list
288288
if (doNoRetry) {
289-
status = ExecutionStatus.FAILED_IGNORED;
290289
return false;
291290
}
292291
// check if this should not be retried based on the backoff
293292
long backOff = postProcessingHandler.backOff(rqueueMessage, userMessage, failureCount, error);
294-
if (backOff == TaskExecutionBackOff.DO_NOT_RETRY) {
295-
status = ExecutionStatus.FAILED_IGNORED;
296-
return false;
297-
}
298293
return backOff != TaskExecutionBackOff.STOP;
299294
}
300295
return false;

rqueue-core/src/main/java/com/github/sonus21/rqueue/models/enums/ExecutionStatus.java

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public enum ExecutionStatus {
2222
THROTTLED,
2323
DELETED,
2424
FAILED,
25-
FAILED_IGNORED,
2625
IGNORED,
2726
OLD_MESSAGE,
2827
QUEUE_INACTIVE,

rqueue-core/src/main/java/com/github/sonus21/rqueue/utils/backoff/TaskExecutionBackOff.java

-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ public interface TaskExecutionBackOff {
2525
* should not be retried further.
2626
*/
2727
long STOP = -1;
28-
/**
29-
* Return this value, so that it will not retry post-failure, and it won't move to DLQ as well.
30-
*/
31-
long DO_NOT_RETRY = -2;
32-
3328
/**
3429
* Return the number of milliseconds to wait for the same message to be consumed.
3530
* <p>Return {@value #STOP} to indicate that no further enqueue should be made for the message.
@@ -44,7 +39,6 @@ public interface TaskExecutionBackOff {
4439

4540
/**
4641
* Return the number of milliseconds to wait for the same message to be consumed.
47-
* <p>Return {@value #DO_NOT_RETRY} to indicate that no further retry should be made</p>
4842
* <p>Return {@value #STOP} to indicate message should be moved to DLQ if DLQ is set</p>
4943
*
5044
* @param message message that's fetched

0 commit comments

Comments
 (0)