feat: Task scheduling supports function with parameters

注意:参数资源sql;
ALTER TABLE `sys_job`
ADD COLUMN `args` varchar(255) NULL COMMENT '目标参数' AFTER `invoke_target`;
This commit is contained in:
zhangwenjian committed 2020-08-20 06:30:44 +08:00
1 parent 242902d2bc
commit b26258c8ab
5 files changed
+24 -6

No files matched your search

+3 -3
View File
@@ -6,9 +6,9 @@ type Job interface {
}
type JobsExec interface {
Exec()
Exec(arg interface{}) error
}
func CallExec(e JobsExec) {
e.Exec()
func CallExec(e JobsExec, arg interface{}) error {
return e.Exec(arg)
}