我目前正在使用 kue / node.js
https://github.com/Automattic/kue
创建并保存作业后,数据将在我的本地 redis 服务器中。
var job = queue.create('new_job', {
title: 'welcome email for tj'
, to: 'tj@learnboost.com'
, template: 'welcome-email'
}).save( function(err){
if( !err ) console.log( job.id );
});
Redis CLI
127.0.0.1:6379> keys *
1) "q:job:12"
2) "q:jobs:inactive"
3) "q:stats:work-time"
4) "q:ids"
5) "q:job:11"
6) "q:job:7"
7) "q:search:object:13"
8) "q:search:word:TTL"
9) "q:search:object:2"
10) "q:jobs:new_job:inactive"
..........
现在我重新启动机器并再次检查后,
127.0.0.1:6379> keys *
(empty list or set)
所以它是空的。
这很明显,但我想保留数据,我检查了 kue 文档但我找不到任何东西?
有没有办法做到这一点。
提前致谢 。