handle errors
This commit is contained in:
parent
6145f441b3
commit
e3cdd4b6e2
8 changed files with 86 additions and 22 deletions
25
-/node.js
25
-/node.js
|
|
@ -10615,11 +10615,19 @@ var $;
|
||||||
}) {
|
}) {
|
||||||
tick() {
|
tick() {
|
||||||
this.$.$mol_state_time.now(5000);
|
this.$.$mol_state_time.now(5000);
|
||||||
console.log(this.land().ref().description);
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
if (this.can_change()) {
|
if (this.can_change()) {
|
||||||
const url = this.url().val();
|
const url = this.url().val();
|
||||||
const title = this.title().val();
|
const title = this.title().val();
|
||||||
console.log({ action: "tick", url, title });
|
console.log({ url, title });
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title }
|
||||||
|
});
|
||||||
const request = $mol_fetch.response(url);
|
const request = $mol_fetch.response(url);
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
|
@ -14082,14 +14090,25 @@ var $;
|
||||||
];
|
];
|
||||||
class $hd_canary extends $hyoo_crus_app_node {
|
class $hd_canary extends $hyoo_crus_app_node {
|
||||||
_stat_update() {
|
_stat_update() {
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: "_stat_update",
|
||||||
|
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
||||||
|
});
|
||||||
const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land();
|
const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land();
|
||||||
const list = home_land.Node($hyoo_crus_dict).Item('');
|
const list = home_land.Node($hyoo_crus_dict).Item('');
|
||||||
for (const ref of list.keys()) {
|
for (const ref of list.keys()) {
|
||||||
|
try {
|
||||||
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
|
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
|
||||||
for (const site of user.Sites(null).remote_list()) {
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
site.tick();
|
site.tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
$mol_fail_log(error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
join() {
|
join() {
|
||||||
return new $hd_canary_join;
|
return new $hd_canary_join;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -10606,11 +10606,19 @@ var $;
|
||||||
}) {
|
}) {
|
||||||
tick() {
|
tick() {
|
||||||
this.$.$mol_state_time.now(5000);
|
this.$.$mol_state_time.now(5000);
|
||||||
console.log(this.land().ref().description);
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
if (this.can_change()) {
|
if (this.can_change()) {
|
||||||
const url = this.url().val();
|
const url = this.url().val();
|
||||||
const title = this.title().val();
|
const title = this.title().val();
|
||||||
console.log({ action: "tick", url, title });
|
console.log({ url, title });
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title }
|
||||||
|
});
|
||||||
const request = $mol_fetch.response(url);
|
const request = $mol_fetch.response(url);
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
|
@ -14073,14 +14081,25 @@ var $;
|
||||||
];
|
];
|
||||||
class $hd_canary extends $hyoo_crus_app_node {
|
class $hd_canary extends $hyoo_crus_app_node {
|
||||||
_stat_update() {
|
_stat_update() {
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: "_stat_update",
|
||||||
|
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
||||||
|
});
|
||||||
const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land();
|
const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land();
|
||||||
const list = home_land.Node($hyoo_crus_dict).Item('');
|
const list = home_land.Node($hyoo_crus_dict).Item('');
|
||||||
for (const ref of list.keys()) {
|
for (const ref of list.keys()) {
|
||||||
|
try {
|
||||||
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
|
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
|
||||||
for (const site of user.Sites(null).remote_list()) {
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
site.tick();
|
site.tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
$mol_fail_log(error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
join() {
|
join() {
|
||||||
return new $hd_canary_join;
|
return new $hd_canary_join;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
12
-/web.js
12
-/web.js
|
|
@ -12673,11 +12673,19 @@ var $;
|
||||||
}) {
|
}) {
|
||||||
tick() {
|
tick() {
|
||||||
this.$.$mol_state_time.now(5000);
|
this.$.$mol_state_time.now(5000);
|
||||||
console.log(this.land().ref().description);
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
if (this.can_change()) {
|
if (this.can_change()) {
|
||||||
const url = this.url().val();
|
const url = this.url().val();
|
||||||
const title = this.title().val();
|
const title = this.title().val();
|
||||||
console.log({ action: "tick", url, title });
|
console.log({ url, title });
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title }
|
||||||
|
});
|
||||||
const request = $mol_fetch.response(url);
|
const request = $mol_fetch.response(url);
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -21,13 +21,20 @@ namespace $ {
|
||||||
|
|
||||||
this.$.$mol_state_time.now( 5000 )
|
this.$.$mol_state_time.now( 5000 )
|
||||||
|
|
||||||
console.log(this.land().ref().description)
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description!,
|
||||||
|
});
|
||||||
|
|
||||||
if(this.can_change()) {
|
if(this.can_change()) {
|
||||||
const url = this.url()!.val() as string
|
const url = this.url()!.val() as string
|
||||||
const title = this.title()!.val() as string
|
const title = this.title()!.val() as string
|
||||||
|
console.log({url, title})
|
||||||
console.log({action:"tick", url, title })
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description!,
|
||||||
|
...{action:"tick", url, title }
|
||||||
|
});
|
||||||
|
|
||||||
const request = $mol_fetch.response(url)
|
const request = $mol_fetch.response(url)
|
||||||
this.last_ping_status(null)!.val( request.code() == 200)
|
this.last_ping_status(null)!.val( request.code() == 200)
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,26 @@ namespace $ {
|
||||||
export class $hd_canary extends $hyoo_crus_app_node {
|
export class $hd_canary extends $hyoo_crus_app_node {
|
||||||
@ $mol_mem
|
@ $mol_mem
|
||||||
_stat_update() {
|
_stat_update() {
|
||||||
|
// console.log("asdddddddd")
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: "_stat_update",
|
||||||
|
...{action:"tick", url: "_stat_update", title: "_stat_update" }
|
||||||
|
});
|
||||||
|
|
||||||
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
||||||
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
||||||
|
|
||||||
for (const ref of list.keys()) {
|
for (const ref of list.keys()) {
|
||||||
|
try {
|
||||||
const user = this.$.$hyoo_crus_glob.Node( $hyoo_crus_ref( ref as string ), $hd_canary_app_home )
|
const user = this.$.$hyoo_crus_glob.Node( $hyoo_crus_ref( ref as string ), $hd_canary_app_home )
|
||||||
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
for (const site of user.Sites(null)!.remote_list()) {
|
|
||||||
site.tick()
|
site.tick()
|
||||||
}
|
}
|
||||||
|
} catch( error ) {
|
||||||
|
$mol_fail_log( error )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue