Skip to content

Instantly share code, notes, and snippets.

@minyoung
minyoung / @trigger.dev__sdk@2.3.18.patch
Created February 23, 2024 20:43
@trigger.dev/sdk patch to support async `io.runTask` error callback
diff --git a/dist/index.d.mts b/dist/index.d.mts
index 94a9e104e39ab2b9a1d4fbe59a3723f58e1d02a6..e1b7e1125e45fd918490eafeb1ed2f1194488a7a 100644
--- a/dist/index.d.mts
+++ b/dist/index.d.mts
@@ -1898,12 +1898,13 @@ type JsonRecord<T> = {
[Property in keyof T]: Json;
};
type Json<T = any> = JsonPrimitive | JsonArray | JsonRecord<T>;
-type RunTaskErrorCallback = (error: unknown, task: IOTask, io: IO) => {
+type RunTaskErrorCallbackReturn = {
@minyoung
minyoung / iterate_tensorboard.py
Last active May 17, 2022 04:26
truncated tensorboard event loading
#!/usr/bin/env python
import logging
import threading
import time
logging.basicConfig()
logging.getLogger("tensorboard").setLevel(logging.DEBUG)
from tensorboard.backend.event_processing import directory_watcher