phanterpwa 14.0.4__py3-none-any.whl → 14.0.7__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.
phanterpwa/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  # license: MIT
4
4
 
5
5
  __author__ = "PhanterJR<junior.conex@gmail.com>"
6
- __version__ = "14.0.4"
6
+ __version__ = "14.0.7"
7
7
  __install_requeriments__ = [
8
8
  "psutil",
9
9
  "tornado",
@@ -15,7 +15,7 @@ class CredentialsTables():
15
15
  Field('token', 'text', index=True),
16
16
  Field('auth_user', 'reference auth_user', requires=IS_EMPTY_OR(
17
17
  IS_IN_DB(self.DALDatabase, self.DALDatabase.auth_user))),
18
- Field('date_created', 'datetime', default=datetime.now(), requires=IS_EMPTY_OR(IS_DATETIME())),
18
+ Field('date_created', 'datetime', index=True, default=datetime.now(), requires=IS_EMPTY_OR(IS_DATETIME())),
19
19
  Field('last_resign', 'datetime', default=datetime.now()),
20
20
  Field('remember_me', 'boolean', default=False),
21
21
  Field('locked', 'boolean', default=False),
@@ -26,7 +26,7 @@ class CredentialsTables():
26
26
  Field('form_identify', 'string'),
27
27
  Field('user_agent', 'string'),
28
28
  Field('ip', 'string'),
29
- Field('date_created', 'datetime', default=datetime.now(), requires=IS_DATETIME()),
29
+ Field('date_created', 'datetime', index=True, default=datetime.now(), requires=IS_DATETIME()),
30
30
  Field('client', 'reference client', requires=IS_EMPTY_OR(
31
31
  IS_IN_DB(self.DALDatabase, self.DALDatabase.client)))
32
32
  )
@@ -36,7 +36,7 @@ class CredentialsTables():
36
36
  Field('form_identify', 'string'),
37
37
  Field('user_agent', 'string'),
38
38
  Field('ip', 'string'),
39
- Field('date_created', 'datetime', default=datetime.now(), requires=IS_DATETIME()),
39
+ Field('date_created', 'datetime', index=True, default=datetime.now(), requires=IS_DATETIME()),
40
40
  Field('client', 'reference client', requires=IS_EMPTY_OR(
41
41
  IS_IN_DB(self.DALDatabase, self.DALDatabase.client)))
42
42
  )
@@ -46,7 +46,7 @@ class CredentialsTables():
46
46
  Field('form_identify', 'string'),
47
47
  Field('user_agent', 'string'),
48
48
  Field('ip', 'string'),
49
- Field('date_created', 'datetime', default=datetime.now(), requires=IS_DATETIME()),
49
+ Field('date_created', 'datetime', index=True, default=datetime.now(), requires=IS_DATETIME()),
50
50
  Field('client', 'reference client', requires=IS_EMPTY_OR(
51
51
  IS_IN_DB(self.DALDatabase, self.DALDatabase.client)))
52
52
  )
@@ -98,17 +98,20 @@ class SignClient(web.RequestHandler):
98
98
  deactived_user_expire_date = datetime.now() - timedelta(seconds=self.projectConfig['BACKEND'][self.app_name]['default_time_user_token_expire_remember_me'])
99
99
  str_expire_date = expire_date.strftime('%Y-%m-%d %H:%M:%S')
100
100
  str_anonymous_expire_date = anonymous_expire_date.strftime('%Y-%m-%d %H:%M:%S')
101
- self.DALDatabase(
102
- (self.DALDatabase.client.date_created < str_expire_date)
103
- ).delete()
104
- self.DALDatabase(
105
- (self.DALDatabase.client.auth_user == None)
106
- & (self.DALDatabase.client.date_created < str_anonymous_expire_date)
107
- ).delete()
108
- self.DALDatabase(
109
- (self.DALDatabase.auth_user.activated == False)
110
- & ((self.DALDatabase.auth_user.date_created < deactived_user_expire_date) | (self.DALDatabase.auth_user.date_created == None))
111
- ).delete()
101
+ global CLEANUP_TIME
102
+ if CLEANUP_TIME < datetime.now() - timedelta(seconds=600):
103
+ CLEANUP_TIME = datetime.now()
104
+ self.DALDatabase(
105
+ (self.DALDatabase.client.date_created < str_expire_date)
106
+ ).delete()
107
+ self.DALDatabase(
108
+ (self.DALDatabase.client.auth_user == None)
109
+ & (self.DALDatabase.client.date_created < str_anonymous_expire_date)
110
+ ).delete()
111
+ self.DALDatabase(
112
+ (self.DALDatabase.auth_user.activated == False)
113
+ & ((self.DALDatabase.auth_user.date_created < deactived_user_expire_date) | (self.DALDatabase.auth_user.date_created == None))
114
+ ).delete()
112
115
 
113
116
  self.phanterpwa_client_token = self.request.headers.get('phanterpwa-client-token')
114
117
  self.phanterpwa_authorization = self.request.headers.get('phanterpwa-authorization')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phanterpwa
3
- Version: 14.0.4
3
+ Version: 14.0.7
4
4
  Summary: Tools for the phanterpwadeveloper framework
5
5
  Home-page: https://github.com/PhanterJR/phanterpwa
6
6
  Author: PhanterJR
@@ -1,4 +1,4 @@
1
- phanterpwa/__init__.py,sha256=gVClGsvi4tRX_3_qc9y_Pc10dwH-utDBl_s1oDZw6bw,396
1
+ phanterpwa/__init__.py,sha256=puoz8HlNiXwRfWbmPd0IKWKxHEqE0lxhm0pRSnbctPM,396
2
2
  phanterpwa/__main__.py,sha256=1vSHtv6-sgAgpZiklf9bwarXX1b-fmKx1rjwJw4h78o,4017
3
3
  phanterpwa/compiler.py,sha256=Je3qtVO_cZ69_PPWcXKyBgnRfQ-Ev-zkZ3UTN-ddOTQ,47478
4
4
  phanterpwa/configer.py,sha256=PFO_nVy9r6yt5iDso1amDIR0Ge2UYYK3h-ae9M0Ezyk,26359
@@ -16,7 +16,7 @@ phanterpwa/backend/security.py,sha256=USPky7nqTKASAN60yYs7-NnoR82LMZlf9aGlfz1QbX
16
16
  phanterpwa/backend/pydal/__init__.py,sha256=lpPDHcS9anJ5ceRSW9fBVuAgKK5qtjSoMsVjp3_nCdw,55
17
17
  phanterpwa/backend/pydal/auth.py,sha256=fvRI4vyjjl0ZBuCGjcinp4mVd8sU4Wd1skLoHX_ter8,8606
18
18
  phanterpwa/backend/pydal/cas.py,sha256=PJvHZdXu4JQM0BAEkYSMTw-_Zc8zrlXR200GTA869kg,1581
19
- phanterpwa/backend/pydal/credentials.py,sha256=CInkGkZtJ1c_3qiASDaMXSgwQSlb14CrYOg2WG8RjiA,2283
19
+ phanterpwa/backend/pydal/credentials.py,sha256=b3qeobNmm7pGB7hmbAYpxq2BT222UZ2wpcuDOJ3VXpE,2331
20
20
  phanterpwa/backend/pydal/extra_validations.py,sha256=1FlOZhUuYg4aybL4EwSzH3zWUXbGtOwxxfVxK-qjHkM,1919
21
21
  phanterpwa/backend/pydal/gallery.py,sha256=nETfQ2Dv-0N94Ypq14uGiDKeGlWgxDHLjY4s1zFrnWs,870
22
22
  phanterpwa/backend/pydal/internal_messages.py,sha256=DYDNWpjrvAM0Nn4m5fGkJXJsMVQjwuJgcMaRzOEzmE4,1379
@@ -24,7 +24,7 @@ phanterpwa/backend/request_handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
24
24
  phanterpwa/backend/request_handlers/admin.py,sha256=QnpoCTMRBuviSCdB84G0pUb13kIg6ky8Wv4DEVB7tRQ,63978
25
25
  phanterpwa/backend/request_handlers/auth.py,sha256=epJ2ura3u6YDKNRmvyYGR7FzF1nrgwTpneibP0z9zzw,177284
26
26
  phanterpwa/backend/request_handlers/cas.py,sha256=TeeQaodcHVkhu-cUqesh9NeAuo0oXylzcPXpQ9wG6H4,24996
27
- phanterpwa/backend/request_handlers/credentials.py,sha256=OvLnVHixJSwBYUj-GRLEmeO21Z-sG1T4htRzlsQmk3s,51366
27
+ phanterpwa/backend/request_handlers/credentials.py,sha256=Gs6Rje80A8PaPqYpB39dMlikcXewp9pOLFR9JROH-mU,51550
28
28
  phanterpwa/backend/request_handlers/errors.py,sha256=x3SMdpkO4mxaSRZZQQxtH1zUFh47C06kssfI4CoPokc,4472
29
29
  phanterpwa/backend/request_handlers/i18n_server.py,sha256=p3LQxOdcLHIjgaFs4wO1V2_7gKpfcDT7pDPa7m0-UbQ,3205
30
30
  phanterpwa/backend/request_handlers/internal_messages.py,sha256=w_u3NYw0KZfuCIS8tHJhV12tj_UA0_aBekk22nR3oCc,17382
@@ -435,10 +435,10 @@ phanterpwa/usual_sass/preloaders/indefined_text.sass,sha256=z4JuUtBrzoqH3HuNFXvN
435
435
  phanterpwa/usual_sass/preloaders/run_points.sass,sha256=EYl93ljfgAc-ZLJ0VScrCoIlHP7Nr6NLdxj1zk2wm_E,3367
436
436
  phanterpwa/usual_sass/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60NrtgRWBk_1oMt2_58,1348
437
437
  phanterpwa/usual_sass/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
438
- phanterpwa-14.0.4.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
439
- phanterpwa-14.0.4.dist-info/METADATA,sha256=GITPq9RTDnBt8ObDb___kvPYzIfK0c_f4nEOOa6lpAE,1938
440
- phanterpwa-14.0.4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
441
- phanterpwa-14.0.4.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
442
- phanterpwa-14.0.4.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
443
- phanterpwa-14.0.4.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
444
- phanterpwa-14.0.4.dist-info/RECORD,,
438
+ phanterpwa-14.0.7.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
439
+ phanterpwa-14.0.7.dist-info/METADATA,sha256=E6YAHYwaPI2_EHAUXVpkVdjt2ERmHg389CJmmzl8xy8,1938
440
+ phanterpwa-14.0.7.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
441
+ phanterpwa-14.0.7.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
442
+ phanterpwa-14.0.7.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
443
+ phanterpwa-14.0.7.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
444
+ phanterpwa-14.0.7.dist-info/RECORD,,