Workers inherit the relationships from the app in which they are created. They will have access to all the same services as their parent app. Any top-level definitions, including relationships, are inherited by every worker, unless overridden explicitly. You can configure workers relationships manually by adding relationships key in the .platform.app.yaml file.
name: app
type: python:3.5
workers:
mail:
commands:
start: |
python mail-worker.py
disk: 256
mounts:
test:
source: local
source_path: test
relationships:
database: 'mysqldb:mysql'
For further details on how to configure workers, relationships and customize them more, please check our Docs.