当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript log.info方法代码示例

本文整理汇总了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();
     }
 });
开发者ID:bahout,项目名称:collectortoqueue,代码行数:9,代码来源:producer.ts

示例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');
            })


        });
开发者ID:bahout,项目名称:collectortoqueue,代码行数:48,代码来源:remover.ts

示例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;
                };


            });
开发者ID:bahout,项目名称:collectortoqueue,代码行数:24,代码来源:consumer.ts


注:本文中的sails.log.info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。