django-lambda-tasks 0.6.2__py3-none-any.whl → 0.6.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-lambda-tasks
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Run async tasks in a lambda function
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: awslambdaric
@@ -4,7 +4,7 @@ lambda_tasks/apps.py,sha256=Kcr5BDD67J0XkGdbDdKZp6kDQTGUSU0I8xWcCiKILhs,847
4
4
  lambda_tasks/decorators.py,sha256=e1aaVzTtX2Z5cd2bckY-sKu6B4k4q2J2_A0pxBLYW-s,12830
5
5
  lambda_tasks/environment_loader.py,sha256=fflFd2gs7bChuGsP4vYiX0LFJXKRQbrScONqHB7gQt0,4406
6
6
  lambda_tasks/handler.py,sha256=c4tOdf31ZYiuSDZW0w96QVN1ZUCzSNp6ZG2oJSTHGl8,5343
7
- lambda_tasks/local_executor.py,sha256=IcJBZUg0WYJZCe93qsICvJj9TmkK-dZTRIWEiwTMA2o,5615
7
+ lambda_tasks/local_executor.py,sha256=9EKVz4r2CxwbxltSahAB8Wcq4upB40f0OKa88nTnBL8,5893
8
8
  lambda_tasks/logging.py,sha256=oIiEU9EoZKF-V-s0mQFlxTEUDKg4hqUrQUcPIYRzeqM,1022
9
9
  lambda_tasks/models.py,sha256=xIN951GLekwy1FIzZRgdNTooWStSoBKxqDuLQTVNoTc,10720
10
10
  lambda_tasks/secret_loader.py,sha256=matQqoONHVJuvN-ja_JdxULlUAaLUtSTCXUE3FZ9ZhE,6845
@@ -14,6 +14,6 @@ lambda_tasks/timeouts.py,sha256=vO-0-gmcRPhMbWRmshd2TM5dy_RCdI6oW_WpR50ohNI,2593
14
14
  lambda_tasks/migrations/0001_initial.py,sha256=73evCSkciOn3e9h8dPp88m4Y_nhHzYC9cz3Fv0WcuUc,2356
15
15
  lambda_tasks/migrations/0002_alter_taskrecord_status.py,sha256=9x1bBmcH2zOYgVMpE8FOPkVp74vnVEQNNpP2XeSBs1E,2026
16
16
  lambda_tasks/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- django_lambda_tasks-0.6.2.dist-info/METADATA,sha256=OFU-Avv4mRUt4r1oEjTHBEKroj6hMBAXve88oMjY-t8,31456
18
- django_lambda_tasks-0.6.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
19
- django_lambda_tasks-0.6.2.dist-info/RECORD,,
17
+ django_lambda_tasks-0.6.3.dist-info/METADATA,sha256=4CnTjzj9qiec6OuIksFrnT8ND4TnEarZNAQDfzh4RGw,31456
18
+ django_lambda_tasks-0.6.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
19
+ django_lambda_tasks-0.6.3.dist-info/RECORD,,
@@ -23,11 +23,18 @@ def _pool_initializer() -> None:
23
23
  atexit as a fallback). This prevents workers from being killed
24
24
  mid-operation and leaking semaphores.
25
25
 
26
+ Closes all inherited database connections before setting up Django.
27
+ On Linux (fork-based spawning), child processes inherit copies of the
28
+ parent's DB connections which are in an inconsistent state.
29
+
26
30
  Then sets up Django for task execution.
27
31
  """
28
32
  signal.signal(signal.SIGINT, signal.SIG_IGN)
29
33
 
30
34
  import django
35
+ from django.db import connections
36
+
37
+ connections.close_all()
31
38
 
32
39
  django.setup()
33
40