We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议:临时任务可否支持持久化,类似发短信,消息之类的任务,像hangfire 支持持久化,在可视面板查看错误信息重试。
The text was updated successfully, but these errors were encountered:
可以使用 AddTask 解决
static ConcurrentDictionary<string, Action> _tempTasks = new ConcurrentDictionary<string, Action>(); void OnExecuting(TaskInfo task) { if (task.Topic == "tempTask") { if (_tempTasks.TryGetValue(task.Id, out var handler)) { handler?.Invoke(); _tempTasks.TryRemove(task.Id, _); } } } var taskId = scheduler.AddTask(topic: "tempTask", round: 1, body: "", seconds: 10); _tempTasks.TryAdd(taskId, () => { Console.WriteLine("..."); });
Sorry, something went wrong.
No branches or pull requests
建议:临时任务可否支持持久化,类似发短信,消息之类的任务,像hangfire 支持持久化,在可视面板查看错误信息重试。
The text was updated successfully, but these errors were encountered: