You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can gain some insight into how the queue is doing at a given moment in time.
@@ -153,7 +155,7 @@ Available methods:
153
155
154
156
## Tracking Task Progress
155
157
156
-
Most of the methods on the `IQueue` interface will return a `Guid` that represents the unique id for the task you pushed to the queue. Also, Coravel's queue exposes some internal events that you can hook into.
158
+
Most of the methods on the `IQueue` interface will return a `Guid` that represents the unique id for the task you pushed to the queue. Also, Coravel's queue exposes some internal events that you can hook into.
157
159
158
160
Combining these: you can create listeners for the events `QueueTaskStarted` and `QueueTaskCompleted` that verify the progress of specific tasks in real-time. When a task/job crashes, then the event `DequeuedTaskFailed` will be emitted. Creating a listener for this one might be helpful too.
159
161
@@ -198,6 +200,19 @@ You can adjust this delay in the `appsettings.json` file.
198
200
}
199
201
```
200
202
203
+
Alternatively, you can adjust the consummation delay using `AddQueue`:
204
+
205
+
```csharp
206
+
services.AddQueue(queueOptions=> {
207
+
// Consume queue every 5 seconds.
208
+
queueOptions.ConsummationDelay=5;
209
+
});
210
+
```
211
+
212
+
:::tip
213
+
`QueueOptions` will take precedence over your configuration file if both are defined.
214
+
:::
215
+
201
216
## Logging Task Progress
202
217
203
218
Coravel uses the `ILogger` .NET Core interface to allow logging task progress:
0 commit comments