Skip to content

Commit

Permalink
Switched jobs to use redis from a remote cluster.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Oct 28, 2024
1 parent 86e1864 commit 973be73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ outline: deep

## October 2024

### 2024-10-28
* Switched jobs to use redis from a remote cluster.

### 2024-10-27
* Added ego behavior to useVingRecord() and useVingKind() to allow disambiguation of multiple copies of the same record with different views.
* VingRecord.propOptions() now returns validation options S3File relations in the form of acceptedFileExtensions.
Expand Down
4 changes: 2 additions & 2 deletions ving/jobs/queue.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { jobHandlers } from '#ving/jobs/map.mjs';
* getQueue();
*/
export const getQueue = (options = {}) => {
const queue = new Queue(options?.queueName || 'jobs');
const queue = new Queue(options?.queueName || 'jobs', { connection: useRedis() });
return queue;
}

Expand Down Expand Up @@ -47,7 +47,7 @@ export const addJob = async (type, data = {}, options = { queueName: 'jobs' }) =
throw ving.ouch(404, `Job handler ${type} is not available.`);
const queue = getQueue(options);
const jobOptions = {
connection: useRedis(),
// connection: useRedis(),
removeOnComplete: {
age: 3600, // keep up to 1 hour
count: 1000, // keep up to 1000 jobs
Expand Down

0 comments on commit 973be73

Please sign in to comment.