Snapshot
This commit is contained in:
parent
fc115e5a74
commit
0964775517
@ -52,7 +52,9 @@ export class CronHook implements Hook<CronHookT> {
|
||||
// console.log("Now acting on cron", cronDef);
|
||||
(async () => {
|
||||
try {
|
||||
if (await plug.canInvoke(name)) {
|
||||
await plug.invoke(name, [cronDef]);
|
||||
}
|
||||
} catch (e: any) {
|
||||
console.error("Execution of cron function failed", e);
|
||||
}
|
||||
|
@ -47,7 +47,9 @@ export class Plug<HookT> {
|
||||
return this.system.syscallWithContext({ plug: this }, name, args);
|
||||
}
|
||||
|
||||
// Checks if a function can be invoked (it may be restricted on its execution environment)
|
||||
/**
|
||||
* Checks if a function can be invoked (it may be restricted on its execution environment)
|
||||
*/
|
||||
async canInvoke(name: string) {
|
||||
await this.ready;
|
||||
const funDef = this.manifest!.functions[name];
|
||||
|
Loading…
Reference in New Issue
Block a user