项目包名改为 github.com/ouqiang

pull/21/merge
ouqiang 2017-03-23 13:58:42 +08:00
parent e8351141c0
commit 3a3ae7e024
9 changed files with 46 additions and 13 deletions

View File

@ -6,7 +6,9 @@ import (
"github.com/go-macaron/gzip"
"github.com/go-macaron/session"
"github.com/go-macaron/csrf"
"scheduler/modules/app"
"github.com/ouqiang/cron-scheduler/modules/app"
"fmt"
"os"
)
// web服务器默认端口
@ -43,6 +45,8 @@ func run(ctx *cli.Context) {
// 定时任务调度
func runScheduler() {
fmt.Println("hello world")
os.Exit(1)
}
// 路由注册

28
main.go Normal file
View File

@ -0,0 +1,28 @@
package main
/*--------------------------------------------------------
Linux crontab
HTTPSSH
--------------------------------------------------------*/
import (
"github.com/urfave/cli"
"os"
"github.com/ouqiang/cron-scheduler/cmd"
)
const AppVersion = "0.0.1"
func main() {
app := cli.NewApp()
app.Name = "scheduler"
app.Usage = "schedule cron service"
app.Version = AppVersion
app.Commands = []cli.Command{
cmd.CmdWeb,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args)
}

View File

@ -3,7 +3,7 @@ package models
import (
"github.com/go-xorm/xorm"
"fmt"
"scheduler/modules/setting"
"github.com/ouqiang/cron-scheduler/modules/setting"
"github.com/go-xorm/core"
_ "github.com/go-sql-driver/mysql"
"gopkg.in/macaron.v1"

View File

@ -2,7 +2,7 @@ package models
import (
"time"
"scheduler/modules/utils"
"github.com/ouqiang/cron-scheduler/modules/utils"
)
const PasswordSaltLength = 6;

View File

@ -4,10 +4,10 @@ package ansible
import (
"os"
"scheduler/modules/utils"
"errors"
"gopkg.in/yaml.v2"
"io/ioutil"
"github.com/ouqiang/cron-scheduler/modules/utils"
)
type Handler map[string]interface{}

View File

@ -1,7 +1,7 @@
package ansible
import (
"scheduler/models"
"github.com/ouqiang/cron-scheduler/models"
"sync"
"io/ioutil"
"bytes"

View File

@ -2,11 +2,12 @@ package app
import (
"os"
"scheduler/modules/crontask"
"scheduler/models"
"runtime"
"scheduler/modules/utils"
"scheduler/modules/ansible"
"github.com/ouqiang/cron-scheduler/modules/utils"
"github.com/ouqiang/cron-scheduler/modules/ansible"
"github.com/ouqiang/cron-scheduler/modules/crontask"
"github.com/ouqiang/cron-scheduler/models"
)
var (

View File

@ -1,13 +1,13 @@
package service
import (
"scheduler/models"
"scheduler/modules/utils"
"github.com/ouqiang/cron-scheduler/models"
"github.com/ouqiang/cron-scheduler/modules/utils"
"net/http"
"io/ioutil"
"strconv"
"time"
"scheduler/modules/crontask"
"github.com/ouqiang/cron-scheduler/modules/crontask"
)
type Task struct {}

2
vendor/vendor.json vendored
View File

@ -107,5 +107,5 @@
"revisionTime": "2017-02-08T14:18:51Z"
}
],
"rootPath": "scheduler"
"rootPath": "cron-scheduler"
}