-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate to pgboss 10 #15
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a115473
feat: migrate to pgboss 10
samaratungajs cfb929d
fix: ensure queue exists added
samaratungajs 45b9b2b
chore: bump version to v3.0.0
samaratungajs 393cd73
fix: update helpers
samaratungajs 5939862
fix: remove ensureQueueExists
samaratungajs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import PgBoss from "pg-boss"; | ||
|
||
export function transformOptions( | ||
options?: PgBoss.WorkOptions | PgBoss.ScheduleOptions, | ||
) { | ||
if (!options) return {}; | ||
|
||
const transformedOptions: any = { ...options }; | ||
|
||
if (typeof options.priority === "number") { | ||
transformedOptions.priority = options.priority > 0; | ||
} | ||
|
||
return transformedOptions; | ||
} | ||
|
||
export function normalizeJob(job: any) { | ||
if (typeof job === "object" && "0" in job) { | ||
return job[0]; | ||
} | ||
return job; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@wavezync/nestjs-pgboss", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "A NestJS module that integrates pg-boss for job scheduling and handling.", | ||
"license": "MIT", | ||
"author": "[email protected]", | ||
|
@@ -23,7 +23,7 @@ | |
"peerDependencies": { | ||
"@nestjs/common": "^9 || ^10", | ||
"@nestjs/core": "^9 || ^10", | ||
"pg-boss": "^9", | ||
"pg-boss": "^10", | ||
"reflect-metadata": "^0.1.13 || ^0.2.0", | ||
"rxjs": "^7.2.0" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isnt this automatically creating queue if not exists? do we need to check it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timgit/pg-boss#467
my bad, came across the issue it's fixed now