simo 2.0.20__py3-none-any.whl → 2.0.21__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.
Binary file
simo/core/tasks.py CHANGED
@@ -320,6 +320,17 @@ def time_out_discoveries():
320
320
  gw.finish_discovery()
321
321
 
322
322
 
323
+ @celery_app.task
324
+ def restart_postgresql():
325
+ # restart postgresql daily, so that we do not get in to any kind of
326
+ # hanging connections left by Django, which might happen if things are
327
+ # running for months without a reboot.
328
+ proc = subprocess.Popen(
329
+ ['service', 'postgresql', 'restart']
330
+ )
331
+ proc.communicate()
332
+
333
+
323
334
  @celery_app.on_after_finalize.connect
324
335
  def setup_periodic_tasks(sender, **kwargs):
325
336
  sender.add_periodic_task(1, watch_timers.s())
@@ -327,3 +338,4 @@ def setup_periodic_tasks(sender, **kwargs):
327
338
  sender.add_periodic_task(60 * 60, clear_history.s())
328
339
  sender.add_periodic_task(60 * 60 * 6, update_latest_version_available.s())
329
340
  sender.add_periodic_task(60, drop_fingerprints_learn.s())
341
+ sender.add_periodic_task(60 * 60 * 24, restart_postgresql.s())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simo
3
- Version: 2.0.20
3
+ Version: 2.0.21
4
4
  Summary: Smart Home on Steroids!
5
5
  Author-email: Simanas Venčkauskas <simanas@simo.io>
6
6
  Project-URL: Homepage, https://simo.io
@@ -50,7 +50,7 @@ simo/core/serializers.py,sha256=HMSMOA5IcIYDIVipvuozf6bymJ-drvABPjEs-4lPjsI,1725
50
50
  simo/core/signal_receivers.py,sha256=EZ8NSYZxUgSaLS16YZdK7T__l8dl0joMRllOxx5PUt4,2809
51
51
  simo/core/socket_consumers.py,sha256=n7VE2Fvqt4iEAYLTRbTPOcI-7tszMAADu7gimBxB-Fg,9635
52
52
  simo/core/storage.py,sha256=YlxmdRs-zhShWtFKgpJ0qp2NDBuIkJGYC1OJzqkbttQ,572
53
- simo/core/tasks.py,sha256=K64_8msFxUnggQDD2lBhtv4l7WliajQTlJNwe-m4BvY,10920
53
+ simo/core/tasks.py,sha256=4QShdl39MB6InYfBYiGJ167ARKBhO7WHMvU7i-kvsRU,11325
54
54
  simo/core/todos.py,sha256=eYVXfLGiapkxKK57XuviSNe3WsUYyIWZ0hgQJk7ThKo,665
55
55
  simo/core/types.py,sha256=WJEq48mIbFi_5Alt4wxWMGXxNxUTXqfQU5koH7wqHHI,1108
56
56
  simo/core/views.py,sha256=hlAKpAbCbqI3a-uL5tDp532T2oLFiF0MBzKUJ_SNzo0,5833
@@ -81,7 +81,7 @@ simo/core/__pycache__/serializers.cpython-38.pyc,sha256=YkAXdCwfPEysAQ5Nin9B48cZ
81
81
  simo/core/__pycache__/signal_receivers.cpython-38.pyc,sha256=sgjH_wv-1U99auH5uHb3or0qettPeHAlsz8P7B03ajY,2430
82
82
  simo/core/__pycache__/socket_consumers.cpython-38.pyc,sha256=NJUr7nRyHFvmAumxxWpsod5wzVVZM99rCEuJs1utHA4,8432
83
83
  simo/core/__pycache__/storage.cpython-38.pyc,sha256=BTkYH8QQyjqI0WOtJC8fHNtgu0YA1vjqZclXjC2vCVI,1116
84
- simo/core/__pycache__/tasks.cpython-38.pyc,sha256=9L1a14-cifiS4WSS7SliJ2486tpL245YbPkmUiCUe3A,8244
84
+ simo/core/__pycache__/tasks.cpython-38.pyc,sha256=JTqXI_QPhU8u5c8MdhxILLKcn-5ZlIwtG1mGO4bgB7A,8474
85
85
  simo/core/__pycache__/todos.cpython-38.pyc,sha256=lOqGZ58siHM3isoJV4r7sg8igrfE9fFd-jSfeBa0AQI,253
86
86
  simo/core/__pycache__/views.cpython-38.pyc,sha256=YrKRZPaV_JM4VGpdhVhsK-90UwUTOqp-V-Yj0SRGZgs,4212
87
87
  simo/core/__pycache__/widgets.cpython-38.pyc,sha256=sR0ZeHCHrhnNDBJuRrxp3zUsfBp0xrtF0xrK2TkQv1o,3520
@@ -10446,8 +10446,8 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
10446
10446
  simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10447
10447
  simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10448
10448
  simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10449
- simo-2.0.20.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10450
- simo-2.0.20.dist-info/METADATA,sha256=X6QlC0WNFvTqtlfpynafcfTmwZe6-HqbQKOZt9gumgw,1730
10451
- simo-2.0.20.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10452
- simo-2.0.20.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10453
- simo-2.0.20.dist-info/RECORD,,
10449
+ simo-2.0.21.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10450
+ simo-2.0.21.dist-info/METADATA,sha256=eBUGnUupmrbuL2W8Vyfk1VWkJLEztt_8CYOjOV18J8A,1730
10451
+ simo-2.0.21.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10452
+ simo-2.0.21.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10453
+ simo-2.0.21.dist-info/RECORD,,
File without changes