upd: essential/file updated
worker manager updated
This commit is contained in:
parent
22f34b3937
commit
964ddac31b
@ -0,0 +1,57 @@
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Description
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Name:
|
||||
| - Manager
|
||||
|
|
||||
| Purpose:
|
||||
| - Provides the clock synchronization service for maintaining a
|
||||
| consistent system time reference across automation tasks.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Credit
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Contributor:
|
||||
| - Rajon Ahmed
|
||||
| - Blockonite
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
package manager
|
||||
|
||||
import (
|
||||
"go/module/essential/hidden/service/worker/clock"
|
||||
// Import more workers as needed.
|
||||
)
|
||||
|
||||
// ObrimWorkerManagerAction defines a worker manager action.
|
||||
type ObrimWorkerManagerAction string
|
||||
|
||||
const (
|
||||
// ObrimWorkerManagerActionStart starts all framework workers.
|
||||
ObrimWorkerManagerActionStart ObrimWorkerManagerAction = "start"
|
||||
|
||||
// ObrimWorkerManagerActionStop stops all framework workers.
|
||||
ObrimWorkerManagerActionStop ObrimWorkerManagerAction = "stop"
|
||||
)
|
||||
|
||||
// ObrimWorkerManager starts or stops all framework workers.
|
||||
func ObrimWorkerManager(action ObrimWorkerManagerAction) {
|
||||
switch action {
|
||||
case ObrimWorkerManagerActionStart:
|
||||
clock.ObrimClockStart()
|
||||
// Add more worker start functions as needed.
|
||||
|
||||
case ObrimWorkerManagerActionStop:
|
||||
clock.ObrimClockStop()
|
||||
// Add more worker stop functions as needed.
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user