Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

vi3k6i5
Copy link
Contributor

@vi3k6i5 vi3k6i5 commented May 26, 2021

fix: remove delete of instance if it already exists, as it might be in use by another test
Also include WORKER_INDEX in instance name to reduce chance of clash across workers.

@vi3k6i5 vi3k6i5 requested a review from a team as a code owner May 26, 2021 15:22
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-django API. label May 26, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2021
from google.cloud.spanner_v1 import Client

REGION = "regional-us-central1"
WORKER_INDEX = int(os.getenv("DJANGO_WORKER_INDEX", 0))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could use a UUID here to (practically) guarantee no clashes will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants