yeah, just would be nice to have the simplicity of cron triggers you could twiddle in the dashboard
yeah, just would be nice to have the simplicity of cron triggers you could twiddle in the dashboard
do-transactional-outboxwrangler is the CLI, miniflare is the system that actually mocks a Workers environment, and workerd, if you choose to use it, is the actual Workers runtime.wrangler.toml
You can build a TTL using alarms. Whenever your object is accessed, you would use- KentonsetAlarm()to set the alarm time toDate.now() + timeout. There is only one alarm per object, so each call tosetAlarm()replaces the previous alarm with the new alarm time. When that time is reached, the alarm handler will be invoked. In youralarmhandler, you would usestorage.deleteAll()to delete your object.
Since it’s possible to build TTL using alarms, we probably won’t be adding a separate TTL feature.
env.MY_DO_NAMESPACE.idFromName(name)? Those require a global lookup on object creation and should be avoided.do-transactional-outboxwranglerminiflareworkerdsetAlarm()setAlarm()Date.now() + timeoutalarmstorage.deleteAll()env.MY_DO_NAMESPACE.idFromName(name)