本文整理汇总了TypeScript中sails.log.info方法的典型用法代码示例。如果您正苦于以下问题:TypeScript log.info方法的具体用法?TypeScript log.info怎么用?TypeScript log.info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sails.log
的用法示例。
在下文中一共展示了log.info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
kue.Job.get(id, function (err, job) {
if (err) {
console.log(err)
}
if (job) {
sails.log.info(new Date(), " Removing completed job: ", job.type, job.data,job.id);
job.remove();
}
});
示例2: function
}, function (err, app) {
sails.log.info("Kue remove");
var kue_engine = sails.config.kue;
//register kue.
/* kueHelper.removeAll('Getinfofromurl', kue, 'inactive');
kueHelper.removeAll('Getinfofromurl', kue, 'complete');
kueHelper.removeAll('Getinfofromurl', kue, 'active');
kueHelper.removeAll('findwebsite', kue, 'inactive');
kueHelper.removeAll('findwebsite', kue, 'active');
kueHelper.removeAll('Findwebsite', kue, 'inactive');
kueHelper.removeAll('Findwebsite', kue, 'active');
kueHelper.removeAll('Findwebsite', kue, 'inactive');
kueHelper.removeAll('Findwebsite', kue, 'complete');
kueHelper.removeAll('findwebsite', kue, 'complete');
*/
/* kueHelper.removeAll('Users', kue, 'active');
kueHelper.removeAll('Users', kue, 'inactive');
kueHelper.removeAll('Users', kue, 'complete');
kueHelper.removeAll('User', kue, 'active');
kueHelper.removeAll('User', kue, 'inactive');
kueHelper.removeAll('User', kue, 'complete');*/
/* kueHelper.removeAll('Users2', kue, 'active');
kueHelper.removeAll('Users2', kue, 'inactive');
kueHelper.removeAll('Users2', kue, 'complete');*/
/* kueHelper.removeAll('Findwebsite2', kue, 'active');
kueHelper.removeAll('Findwebsite2', kue, 'inactive');
kueHelper.removeAll('Findwebsite2', kue, 'complete');
*/
_.forEach(options, function (option) {
kueHelper.removeAll(option.kueName, kue, 'active');
kueHelper.removeAll(option.kueName, kue, 'inactive');
kueHelper.removeAll(option.kueName, kue, 'complete');
kueHelper.removeAll(option.kueName, kue, 'failed');
})
});
示例3: function
_.forEach(jobs, function (job, name) {
//console.log('job==>', job, 'name==>', name);
sails.log.info("Registering kue handler: " + name);
//todo to improve concurrency we should get value from job config
var concurrency = _getConcurrency('concurrency', 2);
kue_engine.process(name, concurrency, job);
//local function
function _getConcurrency(params, def) {
try {
var producer = options[name] || {};
//default concurrency
var concurrency = producer[params] || def;
}
catch (e) {
sails.log.error('error in consumer.ts', e)
}
return concurrency;
};
});