Git Product home page Git Product logo

crocodile's Introduction

Crocodile Distributed Task Scheduling System

GitHub Workflow Status Downloads Docker Pulls license Release GitHub issues GitHub pull requests

English | 中文

Introduction

A distributed task scheduling system based on Golang that supports http requests, run golang、python、python3、shell、bat

Screenshot

Click Me

                                                  +----------+
        +-------------+                           ||--------||
        ||-----------||                           ||        ||
        ||           ||                           || Worker ||
        ||   调度中心 ||                           ||         ||
        ||           ||      RPC调用(gRPC)        ||---------||
        ||-----------|| +-----------------------> ||-------- ||
        ||-----------||                           ||        ||
        ||           || <-----------------------+ || Worker ||
  +---> ||   调度中心 ||      任务实时日志            ||        ||
任 |    ||           ||                           ||--------||
务 |    ||-----------|| <------+                  ||--------||
完 |     +------------+        |                  ||        ||
成 |         ^    |            |                  || Worker ||
持 |       实|任   |            |数                ||        ||                
久 |       时|务   |获          |据                 +----------+ 
日 |       志|状   |取          |存                
志 |       日|态   |锁          |储
   |        v     v            v
   |      +-------+-+      +----+---+
   |      |         |      |        |
   +----- |  Redis  |      | MySQL  |
          |         |      |        |
          +---------+      +--------+

Features

  • Add, modify, delete, clone and run tasks on the web node
  • View real-time logs of running tasks and tasks in real time, and can terminate running tasks
  • Multiple task types:
        - Perform http request tasks
        - Run shell, python, golangpython3nodejscodes (of course other languages ​​can also be supported, please provide if necessary)
  • Father and child tasks:
        When the parent task or child task is set, the parent task-> main task-> subtask will be run first. If any task fails, the entire process will be interrupted immediately. You can also set the parent task or subtask Or serial run
  • Scheduling Algorithm:
        Supports four scheduling algorithms: random, rotation, worker weight, minimum worker number to call Worker to run tasks,
  • Custom alarm strategy:
        Can be set to alert multiple users when the task success, failure, or run is completed
        Set the return code or return content of the task to compare whether the actual return code or return content of the task is the same to determine whether the task runs successfully.
  • Host group:
        A task can only be bound to any host group. The running of the task will select a task in this host group to run the task through the task's routing strategy
  • Host:
        A host group can be bound to multiple hosts, the host is the node that actually runs the task, and the dispatch center automatically discovers after registration
  • security strategy
        Certificate encryption encrypts communication data     Access token
  • Task log management, clean up logs
  • Alarm notification support platform
    • Mail
    • WeChat
    • DingDing
    • Slack Channel
    • Telegram Bot
    • WebHook URL
  • Detailed task audit function
        All operations on data changes to users will be recorded
  • Permission control
    • Administrator
              Have all operating rights
    • general user
              New tasks and host groups can be created, but only tasks or host groups that have been created can be operated, but audit records and all users cannot be viewed
    • Guest
      Only viewing authority, no operation modification authority, but can not view audit records, all users

Supported platforms

  • Linux
  • Mac
  • Windows

Quick Start

git clone https://github.com/labulaka521/crocodile
cd crocodile
docker-compose up -d

Then open urlhttp://yourip:8080,you need to input a admin user and password to install it, than you will come in this system

Running

  • Click to download,uncompress it
  • installredismysql,then change config file core.toml
  • If you need to enable certificate authentication between scheduling nodes, please generate a certificate,
        Run the command to generate cert certificate
    crocodile cert
    

     Then two files cert.pem and key.pem will be generated locally in the current directory. After saving these two files, fill in the path of the file in the value configuration file. Each node needs these two files

  • Run as a scheduler center
        Multiple dispatch centers can be started to prevent single points of failure from causing dispatch to hang up

    ./crocodile server -c core.toml
  • Run as a Worker (host) node

    /crocodile client -c core.toml
    
  • View version compilation information

    ./crocodile version
    
  • Configuration Alarm

Development

  • Frontend
    • Install yarn
    • Go to the web directory, first download the dependency yarn, and then run the front-end yarn run dev separately
    • Package to go, execute make frontrnd,
  • Backend
    • Run make runs as a schdeule center
    • Run make runc as worker node

The sql directory is also packaged in go-bindata. During installation, the sql creation statement will be read from the file generated by go-bindata. If the sql is modified, re-execute make bin-data

Doc

Wiki

Donate

If this project could help you, I hope you could donate me by alipay

License

Crocodile is under the MIT license. See the LICENSE file for details.

crocodile's People

Contributors

467892746 avatar dependabot[bot] avatar labulakalia avatar mywaystay avatar zjfsdnu avatar zyh94946 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crocodile's Issues

任务调度停止

我停止了任务的调度, 但是我的 server 日志中一直在显示 task is stop run by auto schedule, 只有当我删除了任务才会停止显示
image

image

日志管理功能问题

清理日志功能:
任务名称、时间等 都是必填,否则会报错;界面显示的不是必填

如果没有任务名称,报错 “请求参数错误”; 这个操作没成功,出错了,审计日志 也会记录

没有时间,报错 error,错误不清晰

error middleware/operation.go:146 json.Unmarshal failed {"error": "json: cannot unmarshal string into Go struct field Cleanlog.preday of type int64"}

没有搜索按钮

如果没有输入任务名称,则不显示日志列表。如果显示 所有的日志,可能会更方便些。

日志遗漏?

image

配置了钉钉通知。
钉钉已经通知了任务执行成功。
日志管理中,查询不到。

如何在 k8s 中优雅的部署crocodile呢?

现象就是获取的 worker IP 并不是容器的,而是主机的 IP。
image

另外还希望,提供一个接口,可以删除原来的老的 worker 主机。
因为需要,在在这个 pod 停止的,清理一下 worker 主机。
看起来像

image

报错:Can't create more than max_prepared_stmt_count statements (current value: 16382)

What Version Of crocodile you using

1.1.4

Describe your issue

从docker-compose安装的,运行一段时间worker会挂掉。

日志:

error	schedule/grpc.go:281	client.SendHb failed	{"error": "rpc error: code = Unknown desc = conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}

没研究源码,目测像是句柄没释放导致

v1.1.16运行约两天的样子,server无法正常提供服务

报错如下,重新启动server端后恢复正常
{"level":"info","time":"2020-07-28T01:12:18.964+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.551277}
{"level":"info","time":"2020-07-28T01:12:19.263+0800","line":"schedule/schedule2.go:571","msg":"start run task","taskname":"check_website_api.dstcar.com"}
{"level":"debug","time":"2020-07-28T01:12:19.263+0800","line":"schedule/schedule2.go:513","msg":"start get lock","taskid":"290165913800413184"}
{"level":"error","time":"2020-07-28T01:12:19.264+0800","line":"schedule/schedule2.go:643","msg":"model.GetTaskByID failed","taskid":"290165913800413184","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"debug","time":"2020-07-28T01:12:19.265+0800","line":"schedule/schedule2.go:528","msg":"start release lock","taskid":"290165913800413184"}
{"level":"debug","time":"2020-07-28T01:12:19.265+0800","line":"schedule/schedule2.go:599","msg":"stop expire lock","lockid":"task:runlock:290165913800413184"}
{"level":"debug","time":"2020-07-28T01:12:21.973+0800","line":"schedule/grpc_impl.go:207","msg":"recv hearbeat","addr":"127.0.0.1:19588"}
{"level":"error","time":"2020-07-28T01:12:21.974+0800","line":"middleware/grpcmidd.go:28","msg":"resp failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"info","time":"2020-07-28T01:12:21.974+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.039417}
{"level":"error","time":"2020-07-28T01:12:22.088+0800","line":"middleware/auth.go:108","msg":"checkAuth failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"warn","time":"2020-07-28T01:12:22.088+0800","line":"middleware/zaplogger.go:41","msg":"Gin","uid":"289850216985661440","method":"get","statuscode":10401,"reqip":"192.168.200.28","latency(ms)":1.281325,"url":"/api/v1/notify","respsize":36}
{"level":"debug","time":"2020-07-28T01:12:24.978+0800","line":"schedule/grpc_impl.go:207","msg":"recv hearbeat","addr":"127.0.0.1:19588"}
{"level":"error","time":"2020-07-28T01:12:24.980+0800","line":"middleware/grpcmidd.go:28","msg":"resp failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"info","time":"2020-07-28T01:12:24.980+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.379629}
{"level":"error","time":"2020-07-28T01:12:27.087+0800","line":"middleware/auth.go:108","msg":"checkAuth failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"warn","time":"2020-07-28T01:12:27.087+0800","line":"middleware/zaplogger.go:41","msg":"Gin","uid":"289850216985661440","method":"get","statuscode":10401,"reqip":"192.168.200.28","latency(ms)":1.247689,"url":"/api/v1/notify","respsize":36}
{"level":"debug","time":"2020-07-28T01:12:27.982+0800","line":"schedule/grpc_impl.go:207","msg":"recv hearbeat","addr":"127.0.0.1:19588"}
{"level":"error","time":"2020-07-28T01:12:27.983+0800","line":"middleware/grpcmidd.go:28","msg":"resp failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"info","time":"2020-07-28T01:12:27.983+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.304077}
{"level":"debug","time":"2020-07-28T01:12:30.985+0800","line":"schedule/grpc_impl.go:207","msg":"recv hearbeat","addr":"127.0.0.1:19588"}
{"level":"error","time":"2020-07-28T01:12:30.986+0800","line":"middleware/grpcmidd.go:28","msg":"resp failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"info","time":"2020-07-28T01:12:30.986+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.220173}
{"level":"warn","time":"2020-07-28T01:12:31.297+0800","line":"schedule/schedule2.go:1081","msg":"task is stop run by auto schedule","taskname":"run_shell","taskid":"290088289640124416"}
{"level":"error","time":"2020-07-28T01:12:32.087+0800","line":"middleware/auth.go:108","msg":"checkAuth failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"warn","time":"2020-07-28T01:12:32.087+0800","line":"middleware/zaplogger.go:41","msg":"Gin","uid":"289850216985661440","method":"get","statuscode":10401,"reqip":"192.168.200.28","latency(ms)":1.41084,"url":"/api/v1/notify","respsize":36}
{"level":"debug","time":"2020-07-28T01:12:33.988+0800","line":"schedule/grpc_impl.go:207","msg":"recv hearbeat","addr":"127.0.0.1:19588"}
{"level":"error","time":"2020-07-28T01:12:33.989+0800","line":"middleware/grpcmidd.go:28","msg":"resp failed","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}
{"level":"info","time":"2020-07-28T01:12:33.989+0800","line":"middleware/grpcmidd.go:36","msg":"[rpc req]","method":"/crocodile.task.Heartbeat/SendHb","req":"port:19588 ","resp":"","reqaddr":"127.0.0.1:39455","latency(ms)":1.355797}
{"level":"info","time":"2020-07-28T01:12:34.263+0800","line":"schedule/schedule2.go:571","msg":"start run task","taskname":"check_website_api.dstcar.com"}
{"level":"debug","time":"2020-07-28T01:12:34.263+0800","line":"schedule/schedule2.go:513","msg":"start get lock","taskid":"290165913800413184"}
{"level":"error","time":"2020-07-28T01:12:34.266+0800","line":"schedule/schedule2.go:643","msg":"model.GetTaskByID failed","taskid":"290165913800413184","error":"conn.PrepareContext failed: Error 1461: Can't create more than max_prepared_stmt_count statements (current value: 16382)"}

主机怎么添加?

image
image
image
你好,我按github 上的操作,主机列表还是空的,要怎样才能添加主机

image
image

1、支持四种调度算法随机、轮训、Worker权重、Worker最少任务数来调用Worker运行任务
假如我新增一个任务(不希望多个进程同时执行,如果同时跑需要加锁,所以脚本想做到同一时间只有一个worker在跑),定时跑,同一时间是不是只会有一个worker处理
2、看页面可以直接写脚本,但是不好进行代码维护,所以是可以直接通过页面的脚本去调用具体路径下的脚本吧
例如,shell 中 调用具体路径下的python 脚本。
这种方式要怎么写才能捕获到python 脚本的异常返回,上报异常。有没有demo 参考
image
shell 脚本异常 应该是通过exit xx 来返回错误码 吧?

你好,看到刚刚支持windows,很好啊,打算使用看看。顺便提几个小建议。

1、为了因应小场景使用,建议redis作为可选使用,存储数据库建议支持sqlite3,这样整个系统会比较轻灵,更加方便易用。
2、建议worker增加在其执行任务过程中向中心提交任务执行进度的报告。
3、建议worker与中心之间以http交互,这样方便可以对接其它语言开发的worker。

最后,感谢作者的无私奉献。

执行任务的时候调度进程会down

另一台服务器上的任务。python脚本,每三秒抓取一次网页,共执行3000次。
能够启动,启动以后会报 进程down,然后重启,然后无故终止。
这个任务没有在命令行输出日志。

image

image

image

反向代理

请问使用nginx反向代理时提示 请求非法是什么原因?


# reverse proxy
location /crocodile/ { 
proxy_pass http://127.0.0.1:5001/crocosdile/;
 include    nginxconfig.io/proxy.conf;
    }

Screenshot_20210623-072048_Chrome~2

修改nginx配置成为这样


# reverse proxy
location / { 
proxy_pass http://127.0.0.1:5001/;
 include    nginxconfig.io/proxy.conf;
    }

可以正常访问。这是什么原因?

MySQL安装出错

是需要创建个 casbin 库吗?
多个sql文件 执行时报错

server 运行端口问题

我在我之间运行成功的那台服务器上, 将 server 的运行端口从 8080 修改为 8180, client 的 8088 端口并未修改,
结果就是 client 一直无法连通 server, 排除端口被占用的问题, 我使用 netstat 查看过, 都没有被占用

image

修改 server 端口为 8080, 成功
image

1.1.5版本 ,收不到钉钉通知,如何排查?

报错日志如下
[root@croco crocodile]# ./crocodile-linux-amd64 version
Version : v1.1.5
Commit : 0f33f88
BuildDate : 2020-07-11
[root@croco crocodile]# cat crocodile.log | grep dingtalk
2020-07-21T09:01:19.514+0800 error alarm/alarm.go:271 send dingding notify failed {"error": "errmsg: invalid timestamp, more: [https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq] errcode: 310000"}

server端CPU占用很高

image

image

centos7下使用docker启动了服务,但是cpu占用很高,目前服务持续运行有4周

http获取不到返回内容问题

我加的 get http://baidu.com 没有返回内容
修改core/tasktype/api.go 代码如下:

bs, err := ioutil.ReadAll(doresp.Body)
if err != nil {
	log.Error("Read failed", zap.Error(err))
	return
}
pw.Write(bs)

//var out = make([]byte, 1024)
//for {
//	n, err := doresp.Body.Read(out)
//	if err != nil {
//		if err == io.EOF {
//			break
//		}
//		log.Error("Read failed", zap.Error(err))
//		return
//	}
//	if n > 0 {
//		pw.Write(out[:n])
//	}
//}

Docker 运行报错

Docker version 19.03.8, build afacb8b
MacOS 10.15.4

docker-compose -f docker-compose.yml up master
...

Attaching to crocodile_master
master_1  | standard_init_linux.go:211: exec user process caused "no such file or directory"

日志管理-日志过滤不友好

image

日志管理的右上角,过滤日志。
如果 任务名称 留空,单选 状态,就报错,不能执行。
如果 任务名称 不输入全称的话,查询不出结果。

建议修改: 任务名称 为空的话,直接按状态 查询结果;任务名不为空的话,模糊查询。

任务有多次重复执行风险

Please Desc Your Question
StartRun()中有加锁、执行任务、释放锁的操作。
如果运行多个调度节点,虽然有锁作为互斥,但也可能执行多次。
例如,调度节点a,获取锁后执行任务1(假如执行10ms),接着释放锁。
这时调度节点b也来获取任务1的锁(调度节点对任务1的群已经释放了),能获取到锁,所以又执行了任务1…
因此,任务短期内可能在多个调度节点上重复执行多次。
不知道我理解对吗?

docker-compose安装失败

image
这个问题有空帮忙看一下,

本地安装的问题,建议这里查询加上库名,不然如果其他数据库有casbin_rule就会报错
image

修改通知信息会报“参数错误”

What Version Of crocodile you using

1.1.7

Describe your issue

在个人中心模块,我添加通知的钉钉号,会报参数错误,调用的具体接口是/api/v1/user/info,请求的具体参数:
{"id":"1112222","email":"","wechat":"","dingphone":"188xxxxxxxx","slack":"","telegram":"","password":"","remark":""}
报错日志:

2020-11-23T11:38:55.493+0800    error   user/user.go:170    ShouldBindJSON failed   {"error": "Key: 'ChangeUserSelf.Name' Error:Field validation for 'Name' failed on the 'required' tag"}

在有uid的情况下,name应该是非必须项,所以应该去掉:
image

client 无法连通 server

# server 运行命令及日志
./crocodile-linux-amd64 server -c core.toml

start run http server	{"addr": "[::]:8080"}
# client 运行命令及报错
./crocodile-linux-amd64 client -c core.toml 
info	router/router.go:196	start run grpc server	{"addr": "[::]:8088"}
error	schedule/grpc.go:234	getgRPCConn failed	{"error": "context deadline exceeded"}
error	schedule/grpc.go:234	getgRPCConn failed	{"error": "context deadline exceeded"}

我的 server 日志中没有收到任何成功注册 client 的日志, 这个是我之前注册成功时候的日志

info    middleware/grpcmidd.go:36       [rpc req]       
{"method": "/crocodile.task.Heartbeat/RegistryHost", "req": "ip:\"127.0.0.1\" port:8088 weight:100 
hostname:\"DESKTOP-XXX\" version:\"v1.1.7\" remark:\"test remark\" ", "resp": "", "reqaddr": "127.0.0.1:59847",
"latency(ms)": 3.9941}

我将我的服务复制到另一台服务器上之后, 出现以上问题
请问这是为什么?

安装初始化时出错了

image
导致出错原因如图,原因是我本地数据库环境里,有好几个库里有casbin_rule表。
建议在sql查询语句里增加:table_schema = '库名' 。

总是报一个错误

error hostgroup/hostgroup.go:278 model.GetHostsByHGID {"error": "can not find hostid", "errorVerbose": "can not find hostid\ngithub.com/labulaka521/crocodile/core/model.GetHostByIDS\n\t/home/runner/work/crocodile/crocodile/core/model/host.go:228\ngithub.com/labulaka521/crocodile/core/model.GetHostsByHGID\n\t/home/runner/work/crocodile/crocodile/core/model/hostgroup.go:191\ngithub.com/labulaka521/crocodile/core/router/api/v1/hostgroup.GetHostsByIHGID\n\t/home/runner/work/crocodile/crocodile/core/router/api/v1/hostgroup/hostgroup.go:276\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147\ngithub.com/labulaka521/crocodile/core/middleware.Oprtation.func1\n\t/home/runner/work/crocodile/crocodile/core/middleware/operation.go:61\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147\ngithub.com/labulaka521/crocodile/core/middleware.PermissionControl.func1\n\t/home/runner/work/crocodile/crocodile/core/middleware/auth.go:118\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147\ngithub.com/labulaka521/crocodile/core/middleware.ZapLogger.func1\n\t/home/runner/work/crocodile/crocodile/core/middleware/zaplogger.go:17\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147\ngithub.com/gin-gonic/gin.RecoveryWithWriter.func1\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:83\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:403\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:364\nnet/http.serverHandler.ServeHTTP\n\t/opt/hostedtoolcache/go/1.13.8/x64/src/net/http/server.go:2802\nnet/http.(*conn).serve\n\t/opt/hostedtoolcache/go/1.13.8/x64/src/net/http/server.go:1890\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.13.8/x64/src/runtime/asm_amd64.s:1357"}

在非管理员操作的时候,校验似乎存在bug

What Version Of crocodile you using

please runcrocodile version
v1.1.7

Describe your issue

if you see some useful log ,you can copy it here
当用户为非管理员的时候,在函数runTask 的调用model.check 时似乎传参中table应该是task表,如下
exist, err := model.Check(ctx, model.TBTask, model.IDCreateByUID, runtask.ID, uid),原先传递的是hostgroup,但是看参数确实task表里面的id和创建者,请关注是否是bug

调度状态按钮调整

停止调度正常调度 位于 任务管理 -> 修改 中, 每次我想要 停止/开启 某个任务, 需要进入修改之后才能 停止/开始
image

能否将其放置到任务管理主界面上, 方便管理任务的停止与开始
image

登陆通过后,提示非法请求

版本 v1.1.7

问题描述

创建用户是手动在数据库里面插入,登陆验证通过,成功获取jwttoken,但是在如下图的代码中失败

enforcer := model.GetEnforcer()

function 的名称是checkAuth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.