Use 'DBOS.', so files to not know what the dbos instance is. (In fact DBOS. doesn't make a DBOS instance, it sets registration information aside for later.)
New lifecycle is also complete:
You use zero or more @DBOS. to register stuff (perhaps in an import file, no problem there).
You say DBOS([config=], [fastapi=]) to configure DBOS. (This seems like it could be optional, but for now you do it.)
You can continue to use @DBOS. to register stuff (perhaps in an import file, no problem there).
Call DBOS launch(). At this point DBOS can start recovery, pollers/scheduler, etc., since everything is registered. (In a fastapi setting, fastapi starts and calls launch() on DBOS because of an event trigger.)
It is now ill-advised to register more workflow functions, because recovery, serving, etc., are already started. (In a fastapi setting this isn't going to happen unless you try something really strange.)
Use 'DBOS.', so files to not know what the doesn't make a DBOS instance, it sets registration information aside for later.)
dbos
instance is. (In fact DBOS.New lifecycle is also complete:
You use zero or more @DBOS. to register stuff (perhaps in an import file, no problem there).
You say DBOS([config=], [fastapi=]) to configure DBOS. (This seems like it could be optional, but for now you do it.)
You can continue to use @DBOS. to register stuff (perhaps in an import file, no problem there).
Call DBOS launch(). At this point DBOS can start recovery, pollers/scheduler, etc., since everything is registered. (In a fastapi setting, fastapi starts and calls launch() on DBOS because of an event trigger.)
It is now ill-advised to register more workflow functions, because recovery, serving, etc., are already started. (In a fastapi setting this isn't going to happen unless you try something really strange.)
Tests for same.