python3-commons 0.5.10__py2.py3-none-any.whl → 0.5.12__py2.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 python3-commons might be problematic. Click here for more details.

python3_commons/audit.py CHANGED
@@ -108,21 +108,17 @@ async def archive_audit_data(root_path: str = 'audit'):
108
108
  month = now.month
109
109
  day = now.day
110
110
  bucket_name = s3_settings.s3_bucket
111
- object_names = []
112
111
  date_path = object_storage.get_absolute_path(f'{root_path}/{year}/{month:02}/{day:02}')
113
112
 
114
- generator = generate_archive(bucket_name, date_path, chunk_size=4096)
113
+ generator = generate_archive(bucket_name, date_path, chunk_size=5*1024*1024)
115
114
  archive_stream = BytesIOStream(generator)
116
115
 
117
- if object_names:
118
- archive_path = object_storage.get_absolute_path(f'audit/.archive/{year}_{month:02}_{day:02}.tar.bz2')
119
- object_storage.put_object(bucket_name, archive_path, archive_stream, -1, part_size=4096)
116
+ archive_path = object_storage.get_absolute_path(f'audit/.archive/{year}_{month:02}_{day:02}.tar.bz2')
117
+ object_storage.put_object(bucket_name, archive_path, archive_stream, -1, part_size=5*1024*1024)
120
118
 
121
- if errors := object_storage.remove_objects(bucket_name, object_names=object_names):
122
- for error in errors:
123
- logger.error(f'Failed to delete object in {bucket_name=}: {error}')
124
- else:
125
- logger.info('No objects to archive found.')
119
+ if errors := object_storage.remove_objects(bucket_name, date_path):
120
+ for error in errors:
121
+ logger.error(f'Failed to delete object in {bucket_name=}: {error}')
126
122
 
127
123
 
128
124
  class ZeepAuditPlugin(Plugin):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-commons
3
- Version: 0.5.10
3
+ Version: 0.5.12
4
4
  Summary: Re-usable Python3 code
5
5
  Home-page: https://github.com/kamikaze/python3-commons
6
6
  Author: Oleg Korsak
@@ -1,5 +1,5 @@
1
1
  python3_commons/__init__.py,sha256=h-KTJUaQ50E3RmkTn_GO88IRunmDTEpNc3ylpFvCTOc,339
2
- python3_commons/audit.py,sha256=SxNupzV4b3wKMM95csWPf6t1Wr2-M2CfLVwx4gebI_U,5215
2
+ python3_commons/audit.py,sha256=FFhczVROKx2vqCd05m0ktmQ0ZAgbD4x0CklWdwJLhk4,5088
3
3
  python3_commons/conf.py,sha256=vSXyFwXx2wb1uy8IffeeI-RoTqhUZs0RLSSG2OLc2ss,598
4
4
  python3_commons/db.py,sha256=qhaDIdzBWgFyeP_XPKfHZlYVlwS2bpBPYMv84yV6820,738
5
5
  python3_commons/fs.py,sha256=wfLjybXndwLqNlOxTpm_HRJnuTcC4wbrHEOaEeCo9Wc,337
@@ -12,9 +12,9 @@ python3_commons/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
12
12
  python3_commons/serializers/json.py,sha256=P288wWz9ic38QWEMrpp_uwKPYkQiOgvE1cI4WZn6ZCg,808
13
13
  python3_commons/serializers/msgpack.py,sha256=P7CZoRTBeDtgALT5GTOZVCNM_3snOfCnfh5S3zcCIEY,1679
14
14
  python3_commons/serializers/msgspec.py,sha256=ZrfQWBz_67t3yjU_S6avnRJZzYN-HFzef2qGB5W21KI,2023
15
- python3_commons-0.5.10.dist-info/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
16
- python3_commons-0.5.10.dist-info/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
17
- python3_commons-0.5.10.dist-info/METADATA,sha256=PwWkMe3SrcjJYZlydnhRKXIJvlaymfNnQj_2w0vL_uc,975
18
- python3_commons-0.5.10.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
19
- python3_commons-0.5.10.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
20
- python3_commons-0.5.10.dist-info/RECORD,,
15
+ python3_commons-0.5.12.dist-info/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
16
+ python3_commons-0.5.12.dist-info/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
17
+ python3_commons-0.5.12.dist-info/METADATA,sha256=wfxRPPz_1dbs0-MYXGHlQwFrVSenEl7kgBSm1RP4QrA,975
18
+ python3_commons-0.5.12.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
19
+ python3_commons-0.5.12.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
20
+ python3_commons-0.5.12.dist-info/RECORD,,