dbos-inc / dbos-transact

The TypeScript framework for backends that scale
https://docs.dbos.dev
MIT License
335 stars 22 forks source link

Scheduled workflows #411

Closed chuck-dbos closed 3 months ago

chuck-dbos commented 3 months ago

Random thought: we need the exactly-once behavior in production, but it could be problematic in a dev environment. Might we want a flag that turns it on?

Sure, I think it makes sense to use current time and not consult the system DB as an option. Where would you put this option? In the config file? In the @Scheduled config object? Elsewhere? (I could see doing both of these).

kraftp commented 3 months ago

Random thought: we need the exactly-once behavior in production, but it could be problematic in a dev environment. Might we want a flag that turns it on?

Sure, I think it makes sense to use current time and not consult the system DB as an option. Where would you put this option? In the config file? In the @scheduled config object? Elsewhere? (I could see doing both of these).

The configuration file makes the most sense to me.

qianl15 commented 3 months ago

Thanks! I like the current implementation. A nit is that registrationObject is no longer used anywhere in workflow config. Can we remove it for now? We can think about refactoring in a separate PR.