29 lines
676 B
TypeScript
29 lines
676 B
TypeScript
|
|
import { Notification, toast } from '@/components/ui'
|
||
|
|
import { generateBackgroundWorkers } from '@/proxy/background-worker/background-worker.service'
|
||
|
|
|
||
|
|
export abstract class UiEvalService {
|
||
|
|
static Init = () => {
|
||
|
|
//console.log('init')
|
||
|
|
}
|
||
|
|
|
||
|
|
static ApiGenerateBackgroundWorkers = () => {
|
||
|
|
const asyncCall = async () => {
|
||
|
|
await generateBackgroundWorkers()
|
||
|
|
}
|
||
|
|
|
||
|
|
asyncCall()
|
||
|
|
|
||
|
|
toast.push(
|
||
|
|
<Notification type="success" duration={2000}>
|
||
|
|
{'Background Workers are being renewed.'}
|
||
|
|
</Notification>,
|
||
|
|
{
|
||
|
|
placement: 'top-center',
|
||
|
|
},
|
||
|
|
)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const _global = (window || global) as any
|
||
|
|
_global.UiEvalService = UiEvalService
|