dbos-inc / dbos-transact-ts

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

scheduled workflow names must be globally-unique not just class-wide-unique #613

Closed apoliakov closed 2 months ago

apoliakov commented 2 months ago

Looks like here we determine when to run a scheduled workflow: https://github.com/dbos-inc/dbos-transact/blob/703b6974acd1bd5734797c9631f508ce4fc5a37d/src/scheduler/scheduler.ts#L118

This queries the dbos.scheduler_state table. That table only has the name of the function, not the name of the class. So two scheduled workflows, in different classes, will conflict with each other.

qianl15 commented 2 months ago

Nice catch! We should fix this.