StellarFw / stellar

A modular action based Web Framework for Node.js
https://stellar-framework.com
MIT License
38 stars 4 forks source link

Update node-resque to the latest version πŸš€ #100

Closed greenkeeper[bot] closed 5 years ago

greenkeeper[bot] commented 7 years ago

Version 5.0.0 of node-resque just got published.

Dependency node-resque
Current Version 4.0.8
Type dependency

The version 5.0.0 is not covered by your current version range.

Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

I recommend you look into these changes and try to get onto the latest version of node-resque. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


Release Notes v5.0.0: Async/Await

Version 5.0 rewrites node-resque to use Async/Await syntax rather than callbacks.

Check out the examples & README for more information on the updated APIs.

Node.js version v8.0.0 and above is now required to run this project.

Breaking Changes

  • Every callback-based method API in the package has changed to become an async method.
    • Errors now throw rather than return an Error object.
    • You can use try/catch to decide what to do with errors in your project
    • for example:
try {
  const queue = new NodeResque.Queue({connection: connectionDetails}, jobs)
  queue.on('error', function (error) { throw error })
  await queue.connect()
} catch (error) {
  console.error(`Queue Connection Error: ${error}`)
}

try {
  await queue.enqueue('math', 'add', [1, 2])
  await queue.enqueue('math', 'add', [1, 2])
  await queue.enqueue('math', 'add', [2, 3])
  await queue.enqueueIn(3000, 'math', 'subtract', [2, 1])
} catch (error) {
  console.error(`Enqueue Error: ${error}`)
}
  • Jobs' perform methods should now be async methods that return a response value, for example:
const jobs = {
  'Sleep Add': {
    plugins: ['JobLock'],
    pluginOptions: {
      JobLock: {}
    },
    perform: async (a, b) => {
      let answer = a + b
      await new Promise((resolve) => { setTimeout(resolve, 1000) })
      return answer
    }
  }
}
  • Plugins now inherit from NodeResque.Plugin, for example:
const NodeResque = require('node-resque')

class MyPlugin extends NodeResque.Plugin {
  beforeEnqueue () {
    // console.log("** beforeEnqueue")
    return true // should the job be enqueued?
  }

  afterEnqueue () {
    // console.log("** afterEnqueue")
  }

  beforePerform () {
    // console.log("** beforePerform")
    return true // should the job be run?
  }

  afterPerform () {
    // console.log("** afterPerform")
  }
}
  • All classes now follow proper convention of having capitol letter names, ie NodeResque.Plugin
  • Plugin lifecycles are now camel case: beforeEnqueue, afterEnqueue, beforePerform, afterPerform
  • Plugin lifecycle methods are now async methods, with no callback (per the above)
Commits

The new version differs by 29 commits.

  • 378d21b readme update
  • 4c74009 remove changelog
  • ca14dd6 Merge pull request #214 from taskrabbit/empty-namespace
  • 9c2ec66 allow for empty namespaces
  • 0750ead Merge branch 'master' of github.com:taskrabbit/node-resque
  • 88280fc formatting
  • 28716ff Merge pull request #213 from S3bb1/patch-1
  • 51d8f47 adjust windows cmd for pids to powershell
  • e125315 look up queue names properly for worker
  • f56abcb clarify queue methods
  • 57d2594 Merge pull request #212 from taskrabbit/promise
  • 10ea43f dot
  • 725f8ca examples work
  • d10b11e examples work
  • a331efe case for plugin file names

There are 29 commits in total.

See the full diff

Not sure how things should work exactly? There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new).

Your Greenkeeper Bot :palm_tree:

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-38.4%) to 32.839% when pulling 4af9f66594f35591e83b525d8b72cf9ae9f43582 on greenkeeper/node-resque-5.0.0 into 1ebbb716bd3515f40bc713f2dc7e2a6e0bef1d32 on dev.

greenkeeper[bot] commented 7 years ago

Version 5.0.1 just got published.

Update to this version instead πŸš€

Release Notes v5.0.1: faster check for de-duplication in delayed queues

Check if job already exists in queue

  • Instead of getting the full set (smembers), and iterating through it, just use sismember.
  • by @SGKumar via #215

misc

  • clarify methods in readme
Commits

The new version differs by 4 commits.

See the full diff

greenkeeper[bot] commented 7 years ago

Version 5.0.2 just got published.

Update to this version instead πŸš€

Release Notes v5.0.2: PluginRunner Fix

Fixes a bug which prevented plugins defined by a function from being run.

Commits

The new version differs by 3 commits.

  • bbc3b86 v5.0.2
  • f13d7a3 Merge pull request #216 from arunsivasankaran/bug/v5/plugin-runner
  • 9e0036e fix: Fix typo in lib/pluginRunner

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.1.0 just got published.

Update to this version instead πŸš€

Release Notes v5.1.0: Locks and BusyBox

Clear locks from QueueLock when a job is popped rather than successful.

Support for BusyBox Linux

Changes the way we detect running PIDs on Linux/Unix/OSX to be more compatible.

Fix Typos in Readme

Commits

The new version differs by 9 commits.

  • da0882f v5.1.0
  • 3abfe1c Merge pull request #228 from taskrabbit/queueLock-clear-lock-before
  • 4a4a8a0 queueLock plugin should clear lock when job is popped from queue not at job success
  • af7880c isolate test plugins
  • d0d6bf6 Merge pull request #227 from rakhnin/busybox
  • 8340686 fix to get list of all processes
  • 138b170 make it possible to use on the linux with busybox
  • 1138425 Merge pull request #224 from istana/patch-2
  • fde58b5 fix some typos in README.md

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.2.0 just got published.

Update to this version instead πŸš€

Commits

The new version differs by 11 commits.

  • a10214f v5.2.0
  • 265b4fb update ruby deps for UI example
  • 0ff9441 update test and lint runners; fixup failing lint lines
  • 51554a8 Merge pull request #235 from taskrabbit/fixup-app-shutdown
  • f54add5 tests all complete and close open connections
  • 41b8af2 core tests passing
  • 1e2be96 basic cleanup; test polution
  • e8540bb Merge pull request #234 from martnst/patch-1
  • 50a9ed8 Fixed typo
  • f0c376d update packages
  • b4e8179 enhance test to ensure that worker.run_at and queue.cleanOldWorkers work

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.3.1 just got published.

Update to this version instead πŸš€

Release Notes v5.3.1

Use .database on connect

  • use options.database with ioredis to select the database number when connectiong
  • by @BayanBennett via #241

Bugs Fixed:

  • Fix multiworker to wait for all children to stop before exiting
  • Only have scheduler poll for stuck workers once a cycle
Commits

The new version differs by 17 commits.

  • 03c6f93 v5.3.1
  • 9a265a7 fix multiworker to wait for all children to stop before exiting; only poll for sstuck workers once
  • 22924f6 fix multiworker to wait for all children to stop before exiting; only poll for sstuck workers once
  • d9d300f update packages
  • c5c0fe1 Merge pull request #241 from BayanBennett/use-.database-on-connect
  • beac4ff use options.database on connect
  • 15323d9 Merge branch 'master' of https://github.com/taskrabbit/node-resque
  • f7ea83f v5.3.0
  • 921841a failing test for returning connection before redis db is selected
  • 1b85096 Merge pull request #239 from taskrabbit/worker-status
  • 22a13c8 typo
  • 6110e7c scheduler clears workers which fail to ping
  • 3bc017b remove worker#workerCleanup
  • 7da9f3a Merge pull request #238 from taskrabbit/jest
  • 6bf789d test with jest

There are 17 commits in total.

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.3.2 just got published.

Update to this version instead πŸš€

Release Notes v5.3.2: Fix an options issue for ioredis auth

Auth and options fixed by @catto via #246

Commits

The new version differs by 4 commits.

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.4.0 just got published.

Update to this version instead πŸš€

Release Notes v5.4.0
  • Ensure that the scheduler will not end until the current cycle is complete (by @jdwuarin via #251)
  • Ensure that queue#checkStuckWorkers only clears workers which haven't been cleared by another process (by @jdwuarin via #251)
  • Relax the requirement to recover a job via forceCleanWorker. If we cannot recover the job/queues of the stuck job, still clear the worker (by @evantahler via #247)
Commits

The new version differs by 9 commits.

  • 186129d v5.4.0
  • 4e6061e Merge pull request #247 from taskrabbit/relaxing-use-of-force
  • 0cffa16 Merge pull request #251 from jdwuarin/master
  • 76cb144 Add check to avoid checkStuckWorkers erroring out.
  • 663ead0 Fix schedulers implicitely returning before it's ended. Fixes #249
  • 5078a6b Merge pull request #248 from rvillanueva/patch-1
  • 8945a96 Update README.md
  • 97a9a66 only write to failed queue if we have an error payload
  • 93c9bc8 relax the requirement to recover a job via forceCleanWorker. It says FoceClean

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.4.1 just got published.

Update to this version instead πŸš€

Release Notes v5.4.1: Allow namespace arrays

When choosing a namespace for your Resque connection (queue, worker, or scheduler), the namespace option can now be an array, ie ['my', 'namespace'] which would resolve to my:namespace in redis.

Commits

The new version differs by 8 commits.

  • cc3f1d8 v5.4.1
  • 6b7fb40 Merge pull request #258 from witem/ISS-245
  • ded1e60 ISS-245 | accept namespace as array
  • 52c11a7 Merge pull request #256 from taskrabbit/keys
  • b89b9ed add a note about ioredis#keyPrefix
  • d3477e4 add tets to demonstrate proper ioredis key prefix behavior
  • 42c4bde Merge pull request #254 from bestekov/master
  • c7471ec Test description typos

See the full diff

greenkeeper[bot] commented 6 years ago

Version 5.5.0 just got published.

Update to this version instead πŸš€

Release Notes v5.5.0: Scan vs Keys

This release changes all uses of redis.keys to redis.scan. This may be slower for the application requesting keys, but will be far more efficient for the redis server.

See #264 and #263 for more details

Commits

The new version differs by 8 commits.

  • 5e73170 v5.5.0
  • 0b7549d Merge pull request #264 from whatl3y/master
  • 99677f7 Add 'not-key' keys to first Array map
  • 10c304e Add unit test for getKeys
  • 19be22c Update error language to correct method name
  • 1b44c68 Use redis recursive scan with match instead of keys to reduce pressure on redis
  • e67b131 Merge pull request #260 from alberto/patch-1
  • 0fd4e59 Fix typo in README

See the full diff

greenkeeper[bot] commented 6 years ago

Update to this version instead πŸš€

Release Notes for v5.5.1: Relative require statements

Use relative require statements. This will enable node-resque to be packed with webpack and others!

bu @ahmedrad via #265

Commits

The new version differs by 4 commits.

  • 5704644 v5.5.1
  • 265180f Merge pull request #265 from getstat/fix-webpack-bundling
  • f246efb avoiding expressions in require statements as much as possible
  • e93e336 using relative paths in require statements to allow for correct webpack dependency resolving

See the full diff

greenkeeper[bot] commented 5 years ago

Update to this version instead πŸš€

Release Notes for v5.5.3

Gracefully & in-parallel stop multiworker

Now when multiworker is asked to stop, all workers are told to stop at the same time. This way, no worker can pick up a new job while waiting for the other workers to stop.

Adding args property to job object when reEnqueue event was emitted

Misc

  • Documentation updates about worker.end
  • dependencies updates and code format updated for latest ESLint version
Commits

The new version differs by 12 commits.

  • 2ffdf0c v5.5.3
  • 29d9433 Merge pull request #274 from manouman/master
  • 5ff5075 Added args property to job object in order to maintain consistency between events
  • db054df Added args to be returned when reEnqueue event was emitted from worker
  • ef907f8 add note about worker.end to readme
  • f547c40 update ruby deps
  • 7517ada Merge pull request #271 from taskrabbit/update-deps
  • 117cc79 test with nodev10 in travis
  • 49fee47 update deps and fix linter errors
  • b499862 update style from #268
  • 0ba3955 Merge pull request #268 from alexsanya/multiworker-graceful-stop
  • cc51856 graceful stop multiworker

See the full diff

gil0mendes commented 5 years ago

This package only will be updated on the new core version!