django-restit 4.1.32__py3-none-any.whl → 4.1.33__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.1.32.dist-info → django_restit-4.1.33.dist-info}/METADATA +1 -1
- {django_restit-4.1.32.dist-info → django_restit-4.1.33.dist-info}/RECORD +8 -8
- rest/__init__.py +1 -1
- taskqueue/models.py +5 -5
- taskqueue/transports/http.py +4 -2
- taskqueue/worker.py +1 -2
- {django_restit-4.1.32.dist-info → django_restit-4.1.33.dist-info}/LICENSE.md +0 -0
- {django_restit-4.1.32.dist-info → django_restit-4.1.33.dist-info}/WHEEL +0 -0
@@ -343,7 +343,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
343
343
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
344
344
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
345
345
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
346
|
-
rest/__init__.py,sha256=
|
346
|
+
rest/__init__.py,sha256=6U9nBasTmc58hTcdKLJO_tYr-kAllDsYaEEg4B5ezTU,121
|
347
347
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
348
348
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
349
349
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -423,17 +423,17 @@ taskqueue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
423
423
|
taskqueue/admin.py,sha256=E6zXoToS_ea3MdoGjZzF1JiepWFtDSoZUQdan8H-pXI,208
|
424
424
|
taskqueue/migrations/0001_initial.py,sha256=JwYib8CK5ftSXlfxKZUcKEEVsXktNB5q3h-2tu9inGk,4738
|
425
425
|
taskqueue/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
426
|
-
taskqueue/models.py,sha256=
|
426
|
+
taskqueue/models.py,sha256=0hqAYWfbWn-EhXL4cvzJNIIblC6gcLceyW3rhmZvnDs,19208
|
427
427
|
taskqueue/periodic.py,sha256=2i0271khrCow3hDmlNEcoAZnesBVl40jd7MIim2Cxs4,3543
|
428
428
|
taskqueue/rpc.py,sha256=CrxWKMTXi1EDvjB6iW5rAlwCpQIP_n1RW8Yfx9aKB9Y,5711
|
429
429
|
taskqueue/tq.py,sha256=PzSoDrawYcqZylruEgsK95gcJ4J_VhdM6rxg9V6_X8E,942
|
430
430
|
taskqueue/transports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
431
431
|
taskqueue/transports/email.py,sha256=H4GaomiyCck5R_AOcsrMawCl-_Bp_Zg-uWto9t1Xcoo,623
|
432
|
-
taskqueue/transports/http.py,sha256=
|
432
|
+
taskqueue/transports/http.py,sha256=WFRLOfto_ODYzRUtYqeJq2GyV63pLfAWbvnRZTzaLIY,2409
|
433
433
|
taskqueue/transports/s3.py,sha256=KI0paoIuQktk1c40Aa5LkzInVVCjXPdL7tPuTfXOtzs,1099
|
434
434
|
taskqueue/transports/sftp.py,sha256=jT1_krjTHA7DCAukD85aGYRCg9m0cEH9EWzOC-wJGdk,1891
|
435
435
|
taskqueue/transports/sms.py,sha256=H1-LIGEMfbUNqJD9amRcsvKUSwtz9yBj1QNfB7EHjHE,142
|
436
|
-
taskqueue/worker.py,sha256=
|
436
|
+
taskqueue/worker.py,sha256=bt3rFrw7Ahf1-RHAqAFCv_M6sMad6u2m2WygnFPsaxI,15960
|
437
437
|
telephony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
438
438
|
telephony/admin.py,sha256=iOdsBfFFbBisdqKSZ36bIrh_z5sU0Wx_PkaFi8wd1iA,243
|
439
439
|
telephony/decorators.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -474,7 +474,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
474
474
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
475
475
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
476
476
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
477
|
-
django_restit-4.1.
|
478
|
-
django_restit-4.1.
|
479
|
-
django_restit-4.1.
|
480
|
-
django_restit-4.1.
|
477
|
+
django_restit-4.1.33.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
478
|
+
django_restit-4.1.33.dist-info/METADATA,sha256=bs9FHm49r70GuX4baI73i2RntoO0Sld5480ehAD4m2E,7573
|
479
|
+
django_restit-4.1.33.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
480
|
+
django_restit-4.1.33.dist-info/RECORD,,
|
rest/__init__.py
CHANGED
taskqueue/models.py
CHANGED
@@ -256,7 +256,7 @@ class Task(models.Model, RestModel):
|
|
256
256
|
tdata = nobjict()
|
257
257
|
tdata.url = url
|
258
258
|
tdata.data = data
|
259
|
-
task = cls(channel="tq_hook",model="tq_web_request", fname=fname, data=tdata)
|
259
|
+
task = cls(channel="tq_hook", model="tq_web_request", fname=fname, data=tdata)
|
260
260
|
if stale_after_seconds:
|
261
261
|
task.stale_after = datetime.now() + timedelta(seconds=stale_after_seconds)
|
262
262
|
task.save()
|
@@ -270,7 +270,7 @@ class Task(models.Model, RestModel):
|
|
270
270
|
tdata.filename = filename
|
271
271
|
tdata.subject = subject
|
272
272
|
tdata.data = data
|
273
|
-
task = cls(channel="tq_hook",model="tq_email_request", data=tdata)
|
273
|
+
task = cls(channel="tq_hook", model="tq_email_request", data=tdata)
|
274
274
|
task.save()
|
275
275
|
task.publish()
|
276
276
|
return task
|
@@ -280,7 +280,7 @@ class Task(models.Model, RestModel):
|
|
280
280
|
tdata = nobjict()
|
281
281
|
tdata.phone = phone
|
282
282
|
tdata.data = data
|
283
|
-
task = cls(channel="tq_hook",model="tq_sms_request", data=tdata)
|
283
|
+
task = cls(channel="tq_hook", model="tq_sms_request", data=tdata)
|
284
284
|
task.save()
|
285
285
|
task.publish()
|
286
286
|
return task
|
@@ -295,7 +295,7 @@ class Task(models.Model, RestModel):
|
|
295
295
|
tdata.username = username
|
296
296
|
tdata.password = password
|
297
297
|
tdata.data = data
|
298
|
-
task = cls(channel="tq_hook",model="tq_sftp_request", data=tdata)
|
298
|
+
task = cls(channel="tq_hook", model="tq_sftp_request", data=tdata)
|
299
299
|
task.save()
|
300
300
|
task.publish()
|
301
301
|
return task
|
@@ -310,7 +310,7 @@ class Task(models.Model, RestModel):
|
|
310
310
|
tdata.aws = aws
|
311
311
|
tdata.secret = secret
|
312
312
|
tdata.when = str(when)
|
313
|
-
task = cls(channel="tq_hook",model="tq_s3_request", data=tdata)
|
313
|
+
task = cls(channel="tq_hook", model="tq_s3_request", data=tdata)
|
314
314
|
task.save()
|
315
315
|
task.publish()
|
316
316
|
return task
|
taskqueue/transports/http.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import requests
|
2
2
|
import time
|
3
3
|
REQ_TIMEOUT = 15.0
|
4
|
-
from
|
4
|
+
from objict import objict
|
5
|
+
|
5
6
|
|
6
7
|
def POST(task, attempts=3, timeout=REQ_TIMEOUT, headers=None):
|
7
8
|
while attempts:
|
@@ -43,13 +44,14 @@ def httpGET(url, params=None, session=None, timeout=REQ_TIMEOUT):
|
|
43
44
|
res = requests.get(url, headers=headers, params=params, timeout=timeout)
|
44
45
|
return res
|
45
46
|
|
47
|
+
|
46
48
|
def httpPOST(url, data, post_json=False, session=None, timeout=REQ_TIMEOUT, headers=None):
|
47
49
|
if not headers or type(headers) is not dict:
|
48
50
|
headers = {'Accept': 'application/json'}
|
49
51
|
if 'Accept' not in headers:
|
50
52
|
headers['Accept'] = 'application/json'
|
51
53
|
if post_json:
|
52
|
-
data =
|
54
|
+
data = objict.fromdict(data).toJSON()
|
53
55
|
headers['Content-type'] = 'application/json'
|
54
56
|
if post_json:
|
55
57
|
if session:
|
taskqueue/worker.py
CHANGED
@@ -194,7 +194,7 @@ class WorkManager(object):
|
|
194
194
|
self.logger.warning("ignore job {}:{}".format(task.id, task.channel))
|
195
195
|
|
196
196
|
def _on_webrequest(self, task):
|
197
|
-
self.logger.debug("starting
|
197
|
+
# self.logger.debug("starting web request to: {}".format(task.data.url))
|
198
198
|
# we need to copy the data and remove the url
|
199
199
|
if task.fname.upper() == "GET":
|
200
200
|
resp = http.GET(task)
|
@@ -207,7 +207,6 @@ class WorkManager(object):
|
|
207
207
|
task.retry_later(from_now_secs=(task.attempts-1) * 120)
|
208
208
|
|
209
209
|
def _on_hookrequest(self, task):
|
210
|
-
self.logger.debug("starting webrequest to: {}".format(task.data.url))
|
211
210
|
# we need to copy the data and remove the url
|
212
211
|
if task.model == "tq_email_request":
|
213
212
|
resp = email.SEND(task)
|
File without changes
|
File without changes
|