mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-12 14:19:00 +01:00
Reviewed and verified at 9b4acc456d.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
14 lines
534 B
JavaScript
14 lines
534 B
JavaScript
void Promise.all([
|
|
import("../../../../packages/plugins/sdk/src/define-plugin.ts"),
|
|
import("../../../../packages/plugins/sdk/src/worker-rpc-host.ts"),
|
|
]).then(([{ definePlugin }, { startWorkerRpcHost }]) => {
|
|
startWorkerRpcHost({ plugin: definePlugin({
|
|
async setup(ctx) {
|
|
ctx.jobs.register("hourly", async job => {
|
|
await ctx.state.set({ scopeKind: "instance", stateKey: job.runId }, { runId: job.runId, scheduledAt: job.scheduledAt });
|
|
});
|
|
},
|
|
async onIdleDrain() { return "none"; },
|
|
}) });
|
|
});
|