Skip to content

Commit c1bb26d

Browse files
[playground] only delete schedules called 'destroy' (#670)
1 parent cf3b3d7 commit c1bb26d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site/ai-playground/src/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ export class Playground extends AIChatAgent<Env, PlaygroundState> {
101101
}
102102

103103
async ensureDestroy() {
104-
const schedules = this.getSchedules();
104+
const schedules = this.getSchedules().filter(
105+
(s) => s.callback === "destroy"
106+
);
105107
if (schedules.length > 0) {
106108
// Cancel previously set destroy schedules
107109
for (const s of schedules) {

0 commit comments

Comments
 (0)