mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-23 17:31:11 +01:00
feat: added modules
This commit is contained in:
13
core/utils/node.go
Normal file
13
core/utils/node.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
func IsMaster() bool {
|
||||
return EnvIsTrue("node.master", false)
|
||||
}
|
||||
|
||||
func GetNodeType() string {
|
||||
if IsMaster() {
|
||||
return "master"
|
||||
} else {
|
||||
return "worker"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user