mirror of
https://github.com/ZSCNetSupportDept/scheduler.git
synced 2025-10-28 20:45:05 +08:00
增加pgx驱动,完善前端的代码,暂定supabase后端数据库
This commit is contained in:
28
signals/issueID.go
Normal file
28
signals/issueID.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package signals
|
||||
|
||||
import (
|
||||
"sync"
|
||||
//"zsxyww.com/scheduler/database"
|
||||
)
|
||||
|
||||
var IssueID int
|
||||
var IssueIDMutex sync.Mutex
|
||||
|
||||
func init() {
|
||||
//启动程序时从数据库获取最后的IssueID用来初始化程序的IssueID变量~
|
||||
}
|
||||
|
||||
// IssueID++
|
||||
func IssueIDPP() {
|
||||
|
||||
IssueIDMutex.Lock()
|
||||
IssueID++
|
||||
IssueIDMutex.Unlock()
|
||||
|
||||
}
|
||||
|
||||
func GetIssueID() int {
|
||||
IssueIDMutex.Lock()
|
||||
defer IssueIDMutex.Unlock()
|
||||
return IssueID
|
||||
}
|
||||
Reference in New Issue
Block a user