[X] I have checked that my issue does not already have a solution in the FAQ
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Version
4.0.0a4
What happened?
There is a schema parameter for the SQLAlchemyDataStore. The apscheduler tables will follow this parameter, but object types (like joboutcome or coalescepolicy) will be created in public
How can we reproduce the bug?
from apscheduler import AsyncScheduler
from apscheduler.datastores.sqlalchemy import SQLAlchemyDataStore
from apscheduler.eventbrokers.asyncpg import AsyncpgEventBroker
from sqlalchemy.ext.asyncio import create_async_engine
engine = create_async_engine('postgresql+asyncpg://...', future=True)
data_store = SQLAlchemyDataStore(engine, schema='apscheduler')
event_broker = AsyncpgEventBroker.from_async_sqla_engine(engine)
scheduler = AsyncScheduler(data_store, event_broker)
async def main() -> None:
async with scheduler:
await scheduler.add_schedule(...)
await scheduler.run_until_stopped()
if __name__ == '__main__':
asyncio.run(main())
Things to check first
[X] I have checked that my issue does not already have a solution in the FAQ
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Version
4.0.0a4
What happened?
There is a
schema
parameter for theSQLAlchemyDataStore
. The apscheduler tables will follow this parameter, but object types (likejoboutcome
orcoalescepolicy
) will be created inpublic
How can we reproduce the bug?