Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ await mail.sendLater((message) => {
```

> [!CAUTION]
> You should insure `@adonisjs/mail` has a correct config, you'd better to test it first.
> You should ensure `@adonisjs/mail` has a correct config, you'd better to test it first.


## Plugin
Expand Down
3 changes: 2 additions & 1 deletion define_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export function defineConfig<Connections extends RedisConnections>(config: {
queueNameForJobs: string
queueNameForWorkers: string
logger: string | null
verbose: boolean
verbose: boolean,
jobsPath: string,
}) {
return config
}
11 changes: 8 additions & 3 deletions jobs.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import app from "@adonisjs/core/services/app"
import { fsImportAll } from "@poppinss/utils"
import Job from "./base_job.js"
import { NodeResqueJob } from './types.js'
import { getConfig } from "./index.js"
import { fsImportAll } from "@poppinss/utils"

export async function importAllJobs() {
const jobs: Record<string, unknown> = await fsImportAll(app.makePath('app/jobs'), {
const path = getConfig('jobsPath') || 'app/jobs';
const jobs: Record<string, unknown> = await fsImportAll(app.makePath(path), {
filter (filePath): boolean {
return filePath.endsWith('.ts') || filePath.endsWith('.js')
},
ignoreMissingRoot: true
})
/**
Expand All @@ -16,7 +21,7 @@ export async function importAllJobs() {
if (!job) {
return false
}
if (typeof job?.prototype?.perform !=='function') {
if (typeof job?.prototype?.perform !== 'function') {
return false
}
if (typeof job?.prototype?.enqueue !== 'function') {
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@
"url": "git+https://github.com/shiny/adonis-resque.git"
},
"devDependencies": {
"@adonisjs/assembler": "^7.7.0",
"@adonisjs/core": "^6.12.1",
"@adonisjs/eslint-config": "^1.3.0",
"@adonisjs/prettier-config": "^1.3.0",
"@adonisjs/assembler": "^7.8.2",
"@adonisjs/core": "^6.19.0",
"@adonisjs/eslint-config": "^1.3.1",
"@adonisjs/prettier-config": "^1.4.5",
"@adonisjs/redis": "8.0.1",
"@adonisjs/tsconfig": "^1.3.0",
"@adonisjs/tsconfig": "^1.4.1",
"@japa/expect": "3.0.2",
"@japa/expect-type": "2.0.2",
"@japa/runner": "3.1.4",
"@types/ms": "^0.7.34",
"@types/node": "^22.5.0",
"@types/node": "^22.16.0",
"copyfiles": "^2.4.1",
"eslint": "^8.57.0",
"nock": "^13.5.5",
"eslint": "^8.57.1",
"nock": "^13.5.6",
"ts-node": "^10.9.2",
"tsup": "^8.2.4",
"typescript": "^5.5.4"
"tsup": "^8.5.0",
"typescript": "^5.8.3"
},
"peerDependencies": {
"@adonisjs/core": "^6.12.1",
Expand All @@ -85,9 +85,9 @@
"target": "esnext"
},
"dependencies": {
"@poppinss/utils": "^6.7.3",
"croner": "^8.1.1",
"@poppinss/utils": "^6.10.0",
"croner": "^8.1.2",
"ms": "^2.1.3",
"node-resque": "^9.3.5"
"node-resque": "^9.3.8"
}
}
Loading