fix job timed out error
This commit is contained in:
@@ -23,15 +23,15 @@ implements RPCExporter{
|
||||
}
|
||||
]
|
||||
|
||||
publish = ( topic: string, msg: UpdateType ) => {
|
||||
publish = async (topic: string, msg: UpdateType ) => {
|
||||
if(!this.subs[topic]) this.subs[topic] = {}
|
||||
Object.entries(this.subs[topic]).forEach(([uuid, callback]:[string, Function]) => {
|
||||
await Promise.all(Object.entries(this.subs[topic]).map(async ([uuid, callback]:[string, Function]) => {
|
||||
try{
|
||||
callback(msg)
|
||||
await callback(msg)
|
||||
}catch(e){
|
||||
delete this.subs[topic][uuid]
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
subscribe = async (topic:string, callback:(p:UpdateType)=>any) : Promise<SubscriptionResponse<{topic: string}>> => {
|
||||
|
||||
@@ -38,14 +38,14 @@ implements FrontworkComponent<ShoutboxIfc, ShoutboxFeatureIfc>, IShoutbox{
|
||||
this.log.push(msg)
|
||||
}
|
||||
|
||||
private broadcast = (uuid:string, msg: ShoutMessage) => {
|
||||
Object.values(this.subs).forEach((cb:any) => {
|
||||
private broadcast = async (uuid:string, msg: ShoutMessage) => {
|
||||
await Promise.all(Object.values(this.subs).map(async (callback:any) => {
|
||||
try{
|
||||
cb(msg)
|
||||
await callback(msg)
|
||||
}catch(e){
|
||||
this.unsubscribe(uuid)
|
||||
delete this.subs[uuid]
|
||||
}
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
getFeed = async () : Promise<ShoutMessage[]> => {
|
||||
|
||||
@@ -27,9 +27,9 @@ export class PagesLayoutComponent implements AfterContentInit{
|
||||
title: 'Loot Rules',
|
||||
link: '/frontcraft/rules',
|
||||
},{
|
||||
icon: "shield",
|
||||
title: 'Armory',
|
||||
link: '/frontcraft/armory'
|
||||
icon: "shield",
|
||||
title: 'Armory',
|
||||
link: '/frontcraft/armory'
|
||||
}]
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user