django-restit 4.2.47__py3-none-any.whl → 4.2.48__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.
- {django_restit-4.2.47.dist-info → django_restit-4.2.48.dist-info}/METADATA +1 -1
- {django_restit-4.2.47.dist-info → django_restit-4.2.48.dist-info}/RECORD +6 -6
- rest/__init__.py +1 -1
- ws4redis/client.py +18 -0
- {django_restit-4.2.47.dist-info → django_restit-4.2.48.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.47.dist-info → django_restit-4.2.48.dist-info}/WHEEL +0 -0
@@ -363,7 +363,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
363
363
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
364
364
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
365
365
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
366
|
-
rest/__init__.py,sha256=
|
366
|
+
rest/__init__.py,sha256=KnVJJajK-Ky2GKTVOJz3uEng2jhxj54WTEyJHBvf1Hk,121
|
367
367
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
368
368
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
369
369
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -485,7 +485,7 @@ wiki/rpc/wiki.py,sha256=iWehZasU8J1E5sPPqz9QoQr3MpGxqu3rd7CH4wFrm2w,1333
|
|
485
485
|
wiki/tq.py,sha256=wvuBZ3OMV_D2o4kpJhVLIOwpEUfwlglqLJQvpncAwtk,313
|
486
486
|
ws4redis/README.md,sha256=QvwdsauPKxx4qQqnJ991xeU8DgFQCj3CeQt-nCE4s-w,3624
|
487
487
|
ws4redis/__init__.py,sha256=teNfv83A_ke1CBt9BB7NsnWCcFBhnUFPsPESjF554_k,46
|
488
|
-
ws4redis/client.py,sha256=
|
488
|
+
ws4redis/client.py,sha256=rvpgUThVzxZZb5ntkmbfKySwOSfuQjgqUdL4sK8wE_s,6924
|
489
489
|
ws4redis/connection.py,sha256=QGjzalYrx1y4o6sb6P1akL-Y2fjf2qil0JCo-ona5F8,13431
|
490
490
|
ws4redis/exceptions.py,sha256=EGLoRTdqJVwz900pwhciqPuSjBBd08hhLgFu6umHrI4,636
|
491
491
|
ws4redis/redis.py,sha256=IfT4p3bUtlqso9rryNliH9Ebzlx8-Q2VJcs1kFioeGA,6093
|
@@ -496,7 +496,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
496
496
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
497
497
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
498
498
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
499
|
-
django_restit-4.2.
|
500
|
-
django_restit-4.2.
|
501
|
-
django_restit-4.2.
|
502
|
-
django_restit-4.2.
|
499
|
+
django_restit-4.2.48.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
500
|
+
django_restit-4.2.48.dist-info/METADATA,sha256=snYuZSXkjdfJXrmr9UVRtGp8Sf76WHS1XTQaLZNJOe0,7594
|
501
|
+
django_restit-4.2.48.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
502
|
+
django_restit-4.2.48.dist-info/RECORD,,
|
rest/__init__.py
CHANGED
ws4redis/client.py
CHANGED
@@ -175,6 +175,24 @@ def rpop(name, timeout=None):
|
|
175
175
|
return r[1].decode()
|
176
176
|
|
177
177
|
|
178
|
+
def lrem(name, value, occurences=1):
|
179
|
+
c = getRedisClient()
|
180
|
+
return c.lrem(name, occurences, value.encode())
|
181
|
+
|
182
|
+
|
183
|
+
def vpop(name, value, timeout=None):
|
184
|
+
c = getRedisClient()
|
185
|
+
start = time.time()
|
186
|
+
while c.lrem(name, 1, value) == 0:
|
187
|
+
if timeout is None:
|
188
|
+
return 0
|
189
|
+
time.sleep(1.0)
|
190
|
+
elapsed = time.time() - start
|
191
|
+
if elapsed > timeout:
|
192
|
+
return 0
|
193
|
+
return 1
|
194
|
+
|
195
|
+
|
178
196
|
def lrange(name, start, end):
|
179
197
|
c = getRedisClient()
|
180
198
|
return [v.decode() for v in c.lrange(name, start, end)]
|
File without changes
|
File without changes
|