const PullDataService = require('../src/PullDataService');
class pull_data_task_item {
    constructor(redis_help) {
        this.isRun = false
        this.redis = redis_help
        this.pullDataService = new PullDataService(redis_help)
    }
    async runTask(call_back,cur_timeRange,page,size){
        this.isRun = true
        let response = await this.pullDataService.get_novel_material_list(cur_timeRange,page,size)
        if(response.success){
            call_back(response,page)
        }else{
            call_back(response,page)
        }
        this.isRun = false
    }

    isRunTask(){
        return this.isRun
    }
}


module.exports = pull_data_task_item;