Django Postgres Lock
Project description
Django Postgres Lock
A Django management command which will run a command inside a Postgres lock, ensuring that only a single instance of the inner command will run.
Installation
Using pip:
$ pip install django-postgres-lock
Edit your Django project's settings module, and add the application to INSTALLED_APPS:
INSTALLED_APPS = [
# ...
"postgres_lock",
# ...
]
Usage
To run clearsessions with the default lock:
$ ./manage.py command_lock -- ./manage.py clearsessions
To use a unique lock for this task:
$ ./manage.py command_lock --name clearsessions -- ./manage.py clearsessions
To exit immediately if a lock can't be acquired:
$ ./manage.py command_lock --try --name clearsessions -- ./manage.py clearsessions
To ignore a lock failure and return a successful exit code:
$ ./manage.py command_lock --try --ignore-fail --name clearsessions -- ./manage.py clearsessions
Project details
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_postgres_lock-0.3.tar.gz.
File metadata
- Download URL: django_postgres_lock-0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa6fbbdd592d66d904220c7e332f70b45b0cbb89457169a3d895e03fe87b63f
|
|
| MD5 |
084e819d164305fef260230d98911505
|
|
| BLAKE2b-256 |
8539434142675ba6d64f6902f3a603474c6924c33695e1ab13245d1208d768df
|
Provenance
The following attestation bundles were made for django_postgres_lock-0.3.tar.gz:
Publisher:
publish.yml on developersociety/django-postgres-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_postgres_lock-0.3.tar.gz -
Subject digest:
0aa6fbbdd592d66d904220c7e332f70b45b0cbb89457169a3d895e03fe87b63f - Sigstore transparency entry: 1189437727
- Sigstore integration time:
-
Permalink:
developersociety/django-postgres-lock@ee7bc493b2471bf6ebe6e76ed1d010e4cc6c04fd -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/developersociety
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee7bc493b2471bf6ebe6e76ed1d010e4cc6c04fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_postgres_lock-0.3-py3-none-any.whl.
File metadata
- Download URL: django_postgres_lock-0.3-py3-none-any.whl
- Upload date:
- Size: 5.4 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 |
ee4ceaa24b42a8294f27e0cfb40248b348a5aa7a699ce3993787ab65427bf94e
|
|
| MD5 |
efeec2506666b3ca3d71e0f59f91baa4
|
|
| BLAKE2b-256 |
94429b4464482bf0673adba3eae91836fae1f8484adcf4c1a83c5bab556c6898
|
Provenance
The following attestation bundles were made for django_postgres_lock-0.3-py3-none-any.whl:
Publisher:
publish.yml on developersociety/django-postgres-lock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_postgres_lock-0.3-py3-none-any.whl -
Subject digest:
ee4ceaa24b42a8294f27e0cfb40248b348a5aa7a699ce3993787ab65427bf94e - Sigstore transparency entry: 1189437728
- Sigstore integration time:
-
Permalink:
developersociety/django-postgres-lock@ee7bc493b2471bf6ebe6e76ed1d010e4cc6c04fd -
Branch / Tag:
refs/tags/0.3 - Owner: https://github.com/developersociety
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee7bc493b2471bf6ebe6e76ed1d010e4cc6c04fd -
Trigger Event:
push
-
Statement type: