Executors for django-tenants which check whether any migrations need running before running them, making it faster.
Project description
Django Tenants Smart Executor
When using django-tenants, migrations can be quite slow when you have a lot of tenants.
This is the case even if there are actually no migrations to run.
This package provides executors that skip running the migrations for a tenant if there are no migrations to run.
If there's no migratuons to run, the schema_migrated signal is still triggered.
Installation
Install using pip (or your package manager of choice):
pip install django-tenants-smart-executor
And configure the GET_EXECUTOR_FUNCTION in your settings.py:
GET_EXECUTOR_FUNCTION = "django_tenants_smart_executor.load_executor"
Usage
When you run migrations when all tenants are migrated, the output will look something like this:
$ python manage.py migrate_schemas
No migrations needed for schema public, only triggering signals
No migrations needed for schema test, only triggering signals
The multiprocessing executor is also supported.
$ python manage.py migrate_schemas --executor multiprocessing
No migrations needed for schema public, only triggering signals
No migrations needed for schema test, only triggering signals
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tenants_smart_executor-0.1.1.tar.gz.
File metadata
- Download URL: django_tenants_smart_executor-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6617a685295cde325ae93d38983201a3f425332fb9f1aa0204eb23187621e0
|
|
| MD5 |
c89fe62b49a1a5f4491be43bc64aafcc
|
|
| BLAKE2b-256 |
0cab62df12903c075eef01c59fd4a763aaf87d7321a0b8343cdd6aa1966bf17d
|
Provenance
The following attestation bundles were made for django_tenants_smart_executor-0.1.1.tar.gz:
Publisher:
build.yml on xelixdev/django-tenants-smart-executor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tenants_smart_executor-0.1.1.tar.gz -
Subject digest:
bc6617a685295cde325ae93d38983201a3f425332fb9f1aa0204eb23187621e0 - Sigstore transparency entry: 713871942
- Sigstore integration time:
-
Permalink:
xelixdev/django-tenants-smart-executor@4ca13c5e5978167343b28a0f868f6017c14f487f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xelixdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@4ca13c5e5978167343b28a0f868f6017c14f487f -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tenants_smart_executor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_tenants_smart_executor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a0ed39bae9ec3f3c697284de85e44352d6a0ede709e6f1360372bc9c57f0dbf
|
|
| MD5 |
808b451808b3cb7627d41f19e5f96bfe
|
|
| BLAKE2b-256 |
2478dd88611c8ff550b1c2109810b326a2fb91b357b93e04eaef705ef5547836
|
Provenance
The following attestation bundles were made for django_tenants_smart_executor-0.1.1-py3-none-any.whl:
Publisher:
build.yml on xelixdev/django-tenants-smart-executor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tenants_smart_executor-0.1.1-py3-none-any.whl -
Subject digest:
5a0ed39bae9ec3f3c697284de85e44352d6a0ede709e6f1360372bc9c57f0dbf - Sigstore transparency entry: 713871945
- Sigstore integration time:
-
Permalink:
xelixdev/django-tenants-smart-executor@4ca13c5e5978167343b28a0f868f6017c14f487f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xelixdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@4ca13c5e5978167343b28a0f868f6017c14f487f -
Trigger Event:
push
-
Statement type: