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:
1 parent
242902d2bc
commit
b26258c8ab
5 files changed
+24
-6
No files matched your search
+3
-3
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user