Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bull

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bull - npm Package Compare versions

Comparing version 4.12.8 to 4.12.9

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [4.12.9](https://github.com/OptimalBits/bull/compare/v4.12.8...v4.12.9) (2024-05-24)
### Bug Fixes
* **retry-job:** throw error when job is not in active state ([#2741](https://github.com/OptimalBits/bull/issues/2741)) ([c29e3b0](https://github.com/OptimalBits/bull/commit/c29e3b061a168c3d40a336a733c382bab14caa57))
## [4.12.8](https://github.com/OptimalBits/bull/compare/v4.12.7...v4.12.8) (2024-05-22)

@@ -2,0 +9,0 @@

32

lib/scripts/moveToFinished-9.js

@@ -33,2 +33,3 @@ 'use strict';

-2 Missing lock.
-3 - Job not in active set.
Events:

@@ -71,11 +72,26 @@ 'completed/failed'

end
-- Includes
local function removeLock(jobKey, stalledKey, token, jobId)
if token ~= "0" then
local lockKey = jobKey .. ':lock'
local lockToken = rcall("GET", lockKey)
if lockToken == token then
rcall("DEL", lockKey)
rcall("SREM", stalledKey, jobId)
else
if lockToken then
-- Lock exists but token does not match
return -6
else
-- Lock is missing completely
return -2
end
end
end
return 0
end
if rcall("EXISTS", KEYS[3]) == 1 then -- // Make sure job exists
if ARGV[5] ~= "0" then
local lockKey = KEYS[3] .. ':lock'
if rcall("GET", lockKey) == ARGV[5] then
rcall("DEL", lockKey)
rcall("SREM", KEYS[8], ARGV[1])
else
return -2
end
local errorCode = removeLock(KEYS[3], KEYS[8], ARGV[5], ARGV[1])
if errorCode < 0 then
return errorCode
end

@@ -82,0 +98,0 @@ -- Remove from active list (if not active we shall return error)

@@ -21,2 +21,3 @@ 'use strict';

-2 - Job Not locked
-3 - Job not in active set
]]

@@ -50,14 +51,28 @@ local rcall = redis.call

end
if rcall("EXISTS", KEYS[3]) == 1 then
-- Check for job lock
if ARGV[3] ~= "0" then
local lockKey = KEYS[3] .. ':lock'
if rcall("GET", lockKey) == ARGV[3] then
local function removeLock(jobKey, stalledKey, token, jobId)
if token ~= "0" then
local lockKey = jobKey .. ':lock'
local lockToken = rcall("GET", lockKey)
if lockToken == token then
rcall("DEL", lockKey)
rcall("SREM", KEYS[6], ARGV[2])
rcall("SREM", stalledKey, jobId)
else
return -2
if lockToken then
-- Lock exists but token does not match
return -6
else
-- Lock is missing completely
return -2
end
end
end
rcall("LREM", KEYS[1], 0, ARGV[2])
return 0
end
if rcall("EXISTS", KEYS[3]) == 1 then
local errorCode = removeLock(KEYS[3], KEYS[6], ARGV[3], ARGV[2])
if errorCode < 0 then
return errorCode
end
local numRemovedElements = rcall("LREM", KEYS[1], -1, ARGV[2])
if numRemovedElements < 1 then return -3 end
local target = getTargetQueueList(KEYS[4], KEYS[2], KEYS[5])

@@ -64,0 +79,0 @@ local priority = tonumber(rcall("HGET", KEYS[3], "priority")) or 0

{
"name": "bull",
"version": "4.12.8",
"version": "4.12.9",
"description": "Job manager",

@@ -5,0 +5,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc