handle errors

This commit is contained in:
koplenov 2025-08-17 03:52:52 +03:00
parent 6145f441b3
commit e3cdd4b6e2
8 changed files with 86 additions and 22 deletions

View file

@ -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,12 +14090,23 @@ 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()) {
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home); try {
for (const site of user.Sites(null).remote_list()) { const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
site.tick(); for (const site of user.Sites(null)?.remote_list() ?? []) {
site.tick();
}
}
catch (error) {
$mol_fail_log(error);
continue;
} }
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -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,12 +14081,23 @@ 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()) {
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home); try {
for (const site of user.Sites(null).remote_list()) { const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
site.tick(); for (const site of user.Sites(null)?.remote_list() ?? []) {
site.tick();
}
}
catch (error) {
$mol_fail_log(error);
continue;
} }
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -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

View file

@ -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)

View file

@ -10,14 +10,25 @@ 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()) {
const user = this.$.$hyoo_crus_glob.Node( $hyoo_crus_ref( ref as string ), $hd_canary_app_home ) try {
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;
} }
} }
} }