fix front end issues
This commit is contained in:
parent
177cf45af5
commit
d7afd72e5b
18 changed files with 345 additions and 61 deletions
|
|
@ -20,6 +20,19 @@ func (h *DefaultHandler) OnJobDeleted(jobid uint64) {
|
|||
store.Jobs.Delete(jobid)
|
||||
}
|
||||
|
||||
func (h *DefaultHandler) OnJobFinished(jobid uint64, exitCode int) {
|
||||
existing, ok := store.Jobs.Get(jobid)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if exitCode == 0 {
|
||||
existing.JobStatus = models.JOBSTAT["DONE"]
|
||||
} else {
|
||||
existing.JobStatus = models.JOBSTAT["EXIT"]
|
||||
}
|
||||
store.Jobs.Put(jobid, existing)
|
||||
}
|
||||
|
||||
func (h *DefaultHandler) OnQueueUpdated(queue *models.QueueInfo) {
|
||||
store.Queues.Put(queue.QueueName, *queue)
|
||||
}
|
||||
|
|
@ -38,14 +51,14 @@ func (h *DefaultHandler) OnHostUpdated(incoming *models.HostInfo) {
|
|||
store.Hosts.Put(merged.HostName, merged)
|
||||
}
|
||||
|
||||
// OnHostConfigUpdated applies config-sourced fields onto the existing host entry.
|
||||
// All other fields (worker-sourced) are preserved from the prior entry.
|
||||
// NumCores, NumThreads, Topology, SchedStop have no current write path in
|
||||
// rawWorkerData and remain zero until a future push source populates them
|
||||
// (analogous to the DisptWindow deferral).
|
||||
// OnHostConfigUpdated applies config-sourced fields onto an existing worker-registered host.
|
||||
// Hosts not yet registered by a worker are skipped — config entries like "default" (which sets
|
||||
// cluster-wide defaults) or hosts whose daemons haven't started must not appear in the host list.
|
||||
func (h *DefaultHandler) OnHostConfigUpdated(incoming *models.HostInfo) {
|
||||
existing, _ := store.Hosts.Get(incoming.HostName)
|
||||
existing.HostName = incoming.HostName
|
||||
existing, ok := store.Hosts.Get(incoming.HostName)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
existing.HostModel = incoming.HostModel
|
||||
existing.HostType = incoming.HostType
|
||||
existing.MaxSlot = incoming.MaxSlot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue