
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@fangcha/resque
Advanced tools
npm install @fangcha/resque
const config = {
logFile: `${__dirname}/run.local/resque.log`,
pidFile: `${__dirname}/run.local/resque.pid`,
redisConfig: {
redisHost: '127.0.0.1',
redisPort: 6379,
},
moduleMapFile: `${__dirname}/task-map.js`,
queues: [
'TaskQueueDemo',
]
}
module.exports = config
脚本示例,参考 launcher-demo,可保存为 ./node-resque
#!/usr/bin/env node
const { FCLauncher } = require('@fangcha/resque')
const launchFile = process.argv[1]
const cmd = process.argv[2] ? process.argv[2] : ''
const launcher = new FCLauncher(launchFile, config)
launcher.handle(cmd)
./node-resque start
启动后,将根据 config 配置生成 pid 文件及日志文件
命令支持: start / stop / restart / status
IResqueTask 的类,并实现 async perform(params) 方法,参考 TaskDemo// TaskDemo.js
const { IResqueTask } = require('@fangcha/resque')
class TaskDemo extends IResqueTask {
async perform(params) {
// do something
}
}
module.exports = TaskDemo
参考本工程的 task-map.js,TaskDemo 即代表了任务类
module.exports = {
TaskDemo: require('./TaskDemo')
}
const { Resque } = require('@fangcha/resque')
Resque.setRedisBackend(config.redisConfig)
...
await Resque.enqueue('TaskQueueDemo', 'TaskDemo', params)
您可以参考 tests/resque 中的代码
FAQs
Node resque.
The npm package @fangcha/resque receives a total of 11 weekly downloads. As such, @fangcha/resque popularity was classified as not popular.
We found that @fangcha/resque demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.