Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lei Li
pluginx
Commits
a6e286cc
Commit
a6e286cc
authored
Oct 14, 2024
by
Lei Li
Browse files
feat: 增加所有插件都启动的接口
parent
d16eda57
Changes
2
Hide whitespace changes
Inline
Side-by-side
pluginmgr/plugin_proc.go
View file @
a6e286cc
...
...
@@ -14,7 +14,10 @@ import (
"linkfog.com/public/lib/l"
)
var
EnableValidatePluginMD5
=
true
var
(
EnableValidatePluginMD5
=
true
InitDur
time
.
Duration
)
type
pluginProcess
struct
{
conf
*
PluginProcessConf
...
...
@@ -128,6 +131,6 @@ func GetProcRSS(pid int) (rss uint64, err error) {
}
func
pathExists
(
path
string
)
bool
{
_
,
err
:=
os
.
Stat
(
path
)
_
,
err
:=
os
.
Stat
(
path
)
return
err
==
nil
||
os
.
IsExist
(
err
)
}
pluginmgr/plugin_proc_mgr.go
View file @
a6e286cc
...
...
@@ -63,7 +63,7 @@ func (mgr *PluginProcessMgr) Stop() {
func
(
mgr
*
PluginProcessMgr
)
run
()
{
mgr
.
detection
()
ticker
:=
time
.
NewTicker
(
10
*
time
.
Second
)
ticker
:=
time
.
NewTicker
(
InitDur
)
defer
ticker
.
Stop
()
defer
close
(
mgr
.
doneResp
)
for
{
...
...
@@ -163,3 +163,13 @@ func (mgr *PluginProcessMgr) unregisterAllProcess() {
mgr
.
unregisterProcess
(
name
,
p
)
}
}
func
(
mgr
*
PluginProcessMgr
)
AllPluginProcessIsRunning
()
bool
{
for
_
,
p
:=
range
mgr
.
pluginProcessMap
{
if
p
.
isExited
()
{
return
false
}
}
return
true
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment