simo 2.5.23__py3-none-any.whl → 2.5.24__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.
Potentially problematic release.
This version of simo might be problematic. Click here for more details.
- simo/core/__pycache__/tasks.cpython-38.pyc +0 -0
- simo/core/context.py +5 -1
- simo/core/management/update.py +4 -1
- simo/core/tasks.py +22 -5
- simo/fleet/__pycache__/socket_consumers.cpython-38.pyc +0 -0
- simo/fleet/socket_consumers.py +15 -10
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/METADATA +1 -1
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/RECORD +12 -12
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/LICENSE.md +0 -0
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/WHEEL +0 -0
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/entry_points.txt +0 -0
- {simo-2.5.23.dist-info → simo-2.5.24.dist-info}/top_level.txt +0 -0
|
Binary file
|
simo/core/context.py
CHANGED
|
@@ -14,10 +14,14 @@ def additional_templates_context(request):
|
|
|
14
14
|
instances = Instance.objects.none()
|
|
15
15
|
else:
|
|
16
16
|
instances = request.user.instances
|
|
17
|
+
try:
|
|
18
|
+
version = pkg_resources.get_distribution('simo')
|
|
19
|
+
except:
|
|
20
|
+
version = 'dev'
|
|
17
21
|
ctx = {
|
|
18
22
|
'hub_ip': get_self_ip(),
|
|
19
23
|
'dynamic_settings': dynamic_settings,
|
|
20
|
-
'current_version':
|
|
24
|
+
'current_version': version,
|
|
21
25
|
'update_available': is_update_available(True),
|
|
22
26
|
'instances': instances,
|
|
23
27
|
'current_instance': get_current_instance()
|
simo/core/management/update.py
CHANGED
|
@@ -54,7 +54,10 @@ def maybe_update():
|
|
|
54
54
|
if not os.path.exists('/etc/SIMO/_var/auto_update'):
|
|
55
55
|
print("Auto updates are disabled")
|
|
56
56
|
else:
|
|
57
|
-
|
|
57
|
+
try:
|
|
58
|
+
current = pkg_resources.get_distribution('simo')
|
|
59
|
+
except:
|
|
60
|
+
current = 'dev'
|
|
58
61
|
resp = requests.get("https://pypi.org/pypi/simo/json")
|
|
59
62
|
if resp.status_code != 200:
|
|
60
63
|
sys.exit("Bad response from PyPi")
|
simo/core/tasks.py
CHANGED
|
@@ -119,8 +119,13 @@ def sync_with_remote():
|
|
|
119
119
|
except:
|
|
120
120
|
mac = ''
|
|
121
121
|
|
|
122
|
+
try:
|
|
123
|
+
version = pkg_resources.get_distribution('simo').version,
|
|
124
|
+
except:
|
|
125
|
+
version = 'dev'
|
|
126
|
+
|
|
122
127
|
report_data = {
|
|
123
|
-
'simo_version':
|
|
128
|
+
'simo_version': version,
|
|
124
129
|
'local_http': 'https://%s' % get_self_ip(),
|
|
125
130
|
'mac': mac,
|
|
126
131
|
'hub_uid': dynamic_settings['core__hub_uid'],
|
|
@@ -141,6 +146,7 @@ def sync_with_remote():
|
|
|
141
146
|
'users': [],
|
|
142
147
|
}
|
|
143
148
|
|
|
149
|
+
users_included = set()
|
|
144
150
|
for iuser in instance.instance_users.all().select_related('user', 'role'):
|
|
145
151
|
instance_data['users'].append({
|
|
146
152
|
'email': iuser.user.email,
|
|
@@ -150,11 +156,16 @@ def sync_with_remote():
|
|
|
150
156
|
'is_active': iuser.is_active,
|
|
151
157
|
'device_token': iuser.user.primary_device_token
|
|
152
158
|
})
|
|
159
|
+
users_included.add(iuser.user.id)
|
|
153
160
|
|
|
154
161
|
# Include god mode users!
|
|
155
162
|
for user in User.objects.filter(
|
|
156
|
-
|
|
157
|
-
).exclude(
|
|
163
|
+
is_master=True
|
|
164
|
+
).exclude(
|
|
165
|
+
email__in=('system@simo.io', 'device@simo.io')
|
|
166
|
+
).exclude(id__in=users_included).distinct():
|
|
167
|
+
if not user.is_active:
|
|
168
|
+
continue
|
|
158
169
|
instance_data['users'].append({
|
|
159
170
|
'email': user.email,
|
|
160
171
|
'is_hub_master': True,
|
|
@@ -456,8 +467,14 @@ def maybe_update_to_latest():
|
|
|
456
467
|
return
|
|
457
468
|
latest = list(resp.json()['releases'].keys())[-1]
|
|
458
469
|
dynamic_settings['core__latest_version_available'] = latest
|
|
459
|
-
|
|
460
|
-
|
|
470
|
+
|
|
471
|
+
try:
|
|
472
|
+
version = pkg_resources.get_distribution('simo').version
|
|
473
|
+
except:
|
|
474
|
+
# dev environment
|
|
475
|
+
version = dynamic_settings['core__latest_version_available']
|
|
476
|
+
|
|
477
|
+
if dynamic_settings['core__latest_version_available'] == version:
|
|
461
478
|
print("Up to date!")
|
|
462
479
|
return
|
|
463
480
|
|
|
Binary file
|
simo/fleet/socket_consumers.py
CHANGED
|
@@ -87,7 +87,6 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
87
87
|
timezone.activate(tz)
|
|
88
88
|
|
|
89
89
|
def get_colonel():
|
|
90
|
-
# looks like update_or_create doesn't work in socket/async environment.
|
|
91
90
|
defaults={
|
|
92
91
|
'instance': self.instance,
|
|
93
92
|
'name': headers.get('colonel-name'),
|
|
@@ -96,16 +95,22 @@ class FleetConsumer(AsyncWebsocketConsumer):
|
|
|
96
95
|
'last_seen': timezone.now(),
|
|
97
96
|
'enabled': True
|
|
98
97
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
# !!!!! ATETION! !!!!!!!
|
|
99
|
+
# update_or_create and get_or_create doesn't
|
|
100
|
+
# provide reliable operation in socket/async environment.
|
|
101
|
+
new = False
|
|
102
|
+
colonel = Colonel.objects.filter(uid=headers['colonel-uid']).first()
|
|
103
|
+
if not colonel:
|
|
104
|
+
new = True
|
|
105
|
+
colonel = Colonel.objects.create(
|
|
106
|
+
uid=headers['colonel-uid'], **defaults
|
|
102
107
|
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
else:
|
|
109
|
+
for key, val in defaults.items():
|
|
110
|
+
if key == 'name':
|
|
111
|
+
continue
|
|
112
|
+
setattr(colonel, key, val)
|
|
113
|
+
colonel.save()
|
|
109
114
|
|
|
110
115
|
return colonel, new
|
|
111
116
|
|
|
@@ -41,7 +41,7 @@ simo/core/apps.py,sha256=CsqpiQerhmrMsH-wGiG-gQgXd9qEkIi-LUaA9cXpKSw,425
|
|
|
41
41
|
simo/core/auto_urls.py,sha256=nNXEgLAAAQAhRWQDA9AbDtw-zcPKmu_pufJaSa8g818,1102
|
|
42
42
|
simo/core/autocomplete_views.py,sha256=l7DmpoeXcwjmBda--tT6zFQTNcyfYpgTaryWP-ghETU,3846
|
|
43
43
|
simo/core/base_types.py,sha256=WypW8hTfzveuTQtruGjLYAGQZIuczxTlW-SdRk3iQug,666
|
|
44
|
-
simo/core/context.py,sha256=
|
|
44
|
+
simo/core/context.py,sha256=xH7Fdd2uO7CMm3a1QHnYJTZfEfPfBDFSScKxAx6q69o,1549
|
|
45
45
|
simo/core/controllers.py,sha256=JvXdwXD7iotA7fIjZmBVshKLQGSt9Na48FMAyHRDh84,35615
|
|
46
46
|
simo/core/dynamic_settings.py,sha256=bUs58XEZOCIEhg1TigR3LmYggli13KMryBZ9pC7ugAQ,1872
|
|
47
47
|
simo/core/events.py,sha256=fH6d5HcPdDqT3R7CZPdo69qTszJ23j3GJt3IFOso3WA,4757
|
|
@@ -59,7 +59,7 @@ simo/core/serializers.py,sha256=WgksN1Ombv240nfQR_UtmKslTWM9vz9Y0yTdN5usiHU,2189
|
|
|
59
59
|
simo/core/signal_receivers.py,sha256=WYBRCFJhP83Ukd-Ipc1HlNyTXdTHD1rl0tV3uOKnYWY,8861
|
|
60
60
|
simo/core/socket_consumers.py,sha256=trRZvBGTJ7xIbfdmVvn7zoiWp_qssSkMZykDrI5YQyE,9783
|
|
61
61
|
simo/core/storage.py,sha256=_5igjaoWZAiExGWFEJMElxUw55DzJG1jqFty33xe8BE,342
|
|
62
|
-
simo/core/tasks.py,sha256=
|
|
62
|
+
simo/core/tasks.py,sha256=KjRx7X948A7j-ZKZNU0LucV-HGRQnd4ai6ikb49yYb0,16517
|
|
63
63
|
simo/core/todos.py,sha256=eYVXfLGiapkxKK57XuviSNe3WsUYyIWZ0hgQJk7ThKo,665
|
|
64
64
|
simo/core/types.py,sha256=WJEq48mIbFi_5Alt4wxWMGXxNxUTXqfQU5koH7wqHHI,1108
|
|
65
65
|
simo/core/views.py,sha256=3SRZr00fyLQf8ja3U-9eekKt-ld5TvU1WQqUWprXfQ4,2390
|
|
@@ -92,7 +92,7 @@ simo/core/__pycache__/serializers.cpython-38.pyc,sha256=d4wpUjFuo8GxaNWbin9GdHKi
|
|
|
92
92
|
simo/core/__pycache__/signal_receivers.cpython-38.pyc,sha256=ZxsQUC_bijcKs2A9BifeqdI5JVS0RCsZpdcBTRoT8o8,6733
|
|
93
93
|
simo/core/__pycache__/socket_consumers.cpython-38.pyc,sha256=KqbO1cOewodVPcy0-htVefyUjCuELKV0o7fOfYqfgPc,8490
|
|
94
94
|
simo/core/__pycache__/storage.cpython-38.pyc,sha256=9R1Xu0FJDflfRXUPsqEgt0SpwiP7FGk7HaR8s8XRyI8,721
|
|
95
|
-
simo/core/__pycache__/tasks.cpython-38.pyc,sha256=
|
|
95
|
+
simo/core/__pycache__/tasks.cpython-38.pyc,sha256=PN2_K7yt2lDRYqbkKIozcENhq0gkW5muE0GVKevLM6o,10951
|
|
96
96
|
simo/core/__pycache__/todos.cpython-38.pyc,sha256=lOqGZ58siHM3isoJV4r7sg8igrfE9fFd-jSfeBa0AQI,253
|
|
97
97
|
simo/core/__pycache__/views.cpython-38.pyc,sha256=K_QM967bIJeU02DJu0Dm7j8RiFDKn_TLzX77YzNkA7c,2495
|
|
98
98
|
simo/core/__pycache__/widgets.cpython-38.pyc,sha256=sR0ZeHCHrhnNDBJuRrxp3zUsfBp0xrtF0xrK2TkQv1o,3520
|
|
@@ -146,7 +146,7 @@ simo/core/drf_braces/tests/serializers/test_enforce_validation_serializer.py,sha
|
|
|
146
146
|
simo/core/drf_braces/tests/serializers/test_form_serializer.py,sha256=IE2xQ1SzhSsOy2BFsBYw_Po-ujKBgIuNoTRxCzhyilE,12995
|
|
147
147
|
simo/core/drf_braces/tests/serializers/test_swapping.py,sha256=o-B5YV5HDxHCVrXYGODeF7lB3rPDGtafNgClx97d6w4,1220
|
|
148
148
|
simo/core/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
149
|
-
simo/core/management/update.py,sha256=
|
|
149
|
+
simo/core/management/update.py,sha256=CDve2OAKBLJpnuhIgOp7riqBm_gl9D0oNKmNOFXGq2E,1964
|
|
150
150
|
simo/core/management/__pycache__/__init__.cpython-38.pyc,sha256=Ptf1WzljXMt3wP1tzOy6q3JfLERYDs66wSHBVdrzjHg,169
|
|
151
151
|
simo/core/management/_hub_template/hub/asgi.py,sha256=ElN_fdeSkf0Ysa7pS9rJVmZ1HmLhFxb8jFaMLqe1220,126
|
|
152
152
|
simo/core/management/_hub_template/hub/celeryc.py,sha256=3ksDXftIZKJ4Cq9WNKJERdZdQlDEnjTQXycweRFmsSQ,27
|
|
@@ -10230,7 +10230,7 @@ simo/fleet/managers.py,sha256=XOpDOA9L-f_550TNSyXnJbun2EmtGz1TenVTMlUSb8E,807
|
|
|
10230
10230
|
simo/fleet/models.py,sha256=xAffeAh5hf8NC94B66ZqmYoF7qDN53wEQ1xE2E9D8Xc,17524
|
|
10231
10231
|
simo/fleet/routing.py,sha256=cofGsVWXMfPDwsJ6HM88xxtRxHwERhJ48Xyxc8mxg5o,149
|
|
10232
10232
|
simo/fleet/serializers.py,sha256=X2M0DFKVaxM6JFGDsdg3S2nJlLIcBvbujidZdfxD88w,2169
|
|
10233
|
-
simo/fleet/socket_consumers.py,sha256=
|
|
10233
|
+
simo/fleet/socket_consumers.py,sha256=LBpdAApNDvUpKIqgbpZxlvIA8GuvB3XEezldZ-Ksi70,18247
|
|
10234
10234
|
simo/fleet/tasks.py,sha256=AGq9BXFNAqkhOANsPvId8yjEbDtVCB3MRsi_AKDpgIM,821
|
|
10235
10235
|
simo/fleet/utils.py,sha256=wNJvURzLP3-aho3D3rfg07N9kWCaMIw5gOsmeeO9Nlg,4740
|
|
10236
10236
|
simo/fleet/views.py,sha256=jT3GcGv_JEj3dqyfHH2whCnGqwT8YEAuFxRgIX4Dk9w,3237
|
|
@@ -10247,7 +10247,7 @@ simo/fleet/__pycache__/managers.cpython-38.pyc,sha256=8uz-xpUiqbGDgXIZ_XRZtFb-Tj
|
|
|
10247
10247
|
simo/fleet/__pycache__/models.cpython-38.pyc,sha256=d1Reu7cAryqGuA_Z0eqVsX7SFUo4_jNnyi1JbK7mWuI,14138
|
|
10248
10248
|
simo/fleet/__pycache__/routing.cpython-38.pyc,sha256=aPrCmxFKVyB8R8ZbJDwdPdFfvT7CvobovvZeq_mqRgY,314
|
|
10249
10249
|
simo/fleet/__pycache__/serializers.cpython-38.pyc,sha256=gIWHJaSUbTe9H_xerD29Fz7BxIqXNzBI60GsIVXbNdY,3134
|
|
10250
|
-
simo/fleet/__pycache__/socket_consumers.cpython-38.pyc,sha256=
|
|
10250
|
+
simo/fleet/__pycache__/socket_consumers.cpython-38.pyc,sha256=av_7AF6ncsVeWC5x44BANe2TR7f0l660NmJY1jKqZww,13904
|
|
10251
10251
|
simo/fleet/__pycache__/tasks.cpython-38.pyc,sha256=RoNxL2WUiW67s9O9DjaYVVjCBSZu2nje0Qn9FJkWVS0,1116
|
|
10252
10252
|
simo/fleet/__pycache__/utils.cpython-38.pyc,sha256=obUd-X2Y-ybx4icqUWq_qwIxrP9yyarJjexWAfO4MTI,3344
|
|
10253
10253
|
simo/fleet/__pycache__/views.cpython-38.pyc,sha256=wilxSvZliSKQ5qC7JjWneYBSdbeZeTsF5uDrOQVmvms,3181
|
|
@@ -10561,9 +10561,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
|
10561
10561
|
simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10562
10562
|
simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10563
10563
|
simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10564
|
-
simo-2.5.
|
|
10565
|
-
simo-2.5.
|
|
10566
|
-
simo-2.5.
|
|
10567
|
-
simo-2.5.
|
|
10568
|
-
simo-2.5.
|
|
10569
|
-
simo-2.5.
|
|
10564
|
+
simo-2.5.24.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
|
|
10565
|
+
simo-2.5.24.dist-info/METADATA,sha256=e0f9ASVs2ZfxneQadAVZZXmw3pN-F71v9AgAtUMcZg0,1924
|
|
10566
|
+
simo-2.5.24.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
10567
|
+
simo-2.5.24.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
|
|
10568
|
+
simo-2.5.24.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
|
|
10569
|
+
simo-2.5.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|