simo 2.0.19__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/controllers.py CHANGED
@@ -244,7 +244,7 @@ class ControllerBase(ABC):
244
244
  introduce(actor)
245
245
  self.component.alive = is_alive
246
246
  if battery_level:
247
- self.battery_level = battery_level
247
+ self.component.battery_level = battery_level
248
248
  self.component.save(update_fields=['alive', 'battery_level'])
249
249
  self.set(value, actor)
250
250
 
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.19
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
@@ -34,7 +34,7 @@ simo/core/auto_urls.py,sha256=0gu-IL7PHobrmKW6ksffiOkAYu-aIorykWdxRNtwGYo,1194
34
34
  simo/core/autocomplete_views.py,sha256=JT5LA2_Wtr60XYSAIqaXFKFYPjrmkEf6yunXD9y2zco,4022
35
35
  simo/core/base_types.py,sha256=yqbIZqBksrAkEuHRbt6iExwPDDy0K5II2NzRCkmOvMU,589
36
36
  simo/core/context.py,sha256=98PXAMie43faRVBFkOG22uNpvGRNprcGhzjBFkrxaRY,1367
37
- simo/core/controllers.py,sha256=2NH1xZFA4_YWNjJWjHqEvCB6SerebiQ5eHZix_xYvx8,26967
37
+ simo/core/controllers.py,sha256=SHqdSRhF7G-hmRtcWEODkUs-b17y6gEHDdZM3V01uVs,26977
38
38
  simo/core/dynamic_settings.py,sha256=U2WNL96JzVXdZh0EqMPWrxqO6BaRR2Eo5KTDqz7MC4o,1943
39
39
  simo/core/events.py,sha256=LvtonJGNyCb6HLozs4EG0WZItnDwNdtnGQ4vTcnKvUs,4438
40
40
  simo/core/filters.py,sha256=ghtOZcrwNAkIyF5_G9Sn73NkiI71mXv0NhwCk4IyMIM,411
@@ -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
@@ -65,7 +65,7 @@ simo/core/__pycache__/auto_urls.cpython-38.pyc,sha256=SVl4fF0-yiq7e9gt08jIM6_rL4
65
65
  simo/core/__pycache__/autocomplete_views.cpython-38.pyc,sha256=hJ6JILI1LqrAtpQMvxnLvljGdW1v1gpvBsD79vFkZ58,3972
66
66
  simo/core/__pycache__/base_types.cpython-38.pyc,sha256=CasZJN42cK_ymoQgn5E4s8oOkuZJ18fVHCgN4GPuT7c,735
67
67
  simo/core/__pycache__/context.cpython-38.pyc,sha256=MSZPDhqMhCpUuBJl3HCIBHZA3BntYeP8RAnQcdqAH9k,1278
68
- simo/core/__pycache__/controllers.cpython-38.pyc,sha256=WmItOZU7CPqyYhxxB1F9I7QAhCqwUn0DSbLii_pqXwI,23818
68
+ simo/core/__pycache__/controllers.cpython-38.pyc,sha256=vGRcRD7VPUdpP2WMtn2IIrnkoFbFaC-DYb8kqushWGQ,23820
69
69
  simo/core/__pycache__/dynamic_settings.cpython-38.pyc,sha256=ELu06Hub4DOidja71ybvD3ZM4HdXiyZjNJrZfnXZXNA,2476
70
70
  simo/core/__pycache__/events.cpython-38.pyc,sha256=A1Axx-qftd1r7st7wkO3DkvTdt9-RkcJe5KJhpzJVk8,5109
71
71
  simo/core/__pycache__/filters.cpython-38.pyc,sha256=VIMADCBiYhziIyRmxAyUDJluZvuZmiC4bNYWTRsGSao,721
@@ -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.19.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10450
- simo-2.0.19.dist-info/METADATA,sha256=99iDIvtxoVQKfKPPXy9OCCiDBFzGsmjlNfaouPPRze4,1730
10451
- simo-2.0.19.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10452
- simo-2.0.19.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10453
- simo-2.0.19.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