This commit is contained in:
张成
2025-12-10 09:58:22 +08:00
parent e77f004dcc
commit 5d1e34ff65
2 changed files with 60 additions and 7 deletions

View File

@@ -22,10 +22,16 @@ class ScheduleConfig {
// 单日操作限制
this.dailyLimits = {
maxSearch: 20, // 每天最多搜索20次
maxApply: 50, // 每天最多投递50份简历
maxApply: 50, // 每天最多投递50份简历(默认值)
maxChat: 100, // 每天最多发送100条聊天
};
// 平台特定的每日投递限制
this.platformDailyLimits = {
boss: 150, // Boss直聘每天最多投递150次
liepin: 50 // 猎聘每天最多投递50次默认值
};
// 任务超时配置(毫秒)
this.taskTimeouts = {
auto_deliver: 30 * 60 * 1000, // 自动投递任务30分钟包含多个子任务
@@ -102,9 +108,15 @@ class ScheduleConfig {
/**
* 获取日限制
* @param {string} operation - 操作类型
* @param {string} platform - 平台类型(可选,用于平台特定的限制)
* @returns {number} 日限制次数
*/
getDailyLimit(operation) {
getDailyLimit(operation, platform = null) {
// 如果是投递操作且指定了平台,使用平台特定的限制
if (operation === 'apply' && platform && this.platformDailyLimits[platform]) {
return this.platformDailyLimits[platform];
}
// 否则使用通用限制
return this.dailyLimits[`max${operation.charAt(0).toUpperCase() + operation.slice(1)}`] || Infinity;
}
}