brynq-sdk-task-scheduler 4.0.7__tar.gz → 4.0.8__tar.gz

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.
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: brynq_sdk_task_scheduler
3
+ Version: 4.0.8
4
+ Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
+ Author: BrynQ
6
+ Author-email: support@brynq.com
7
+ License: BrynQ License
8
+ Requires-Dist: brynq-sdk-brynq<5,>=4
9
+ Requires-Dist: brynq-sdk-functions<3,>=2
10
+ Requires-Dist: brynq-sdk-mysql<4,>=3
11
+ Requires-Dist: brynq-sdk-mandrill<4,>=2
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: description
15
+ Dynamic: license
16
+ Dynamic: requires-dist
17
+ Dynamic: summary
18
+
19
+ Code to execute tasks in the BrynQ.com platform with the task scheduler
@@ -323,13 +323,14 @@ class TaskScheduler:
323
323
 
324
324
  # Clean up execution log
325
325
  # set this date filter above the actual delete filter because of the many uncooperative quotation marks involved in the whole filter
326
- log_date_limit_filter = f"AND created_at >= \'{log_date_limit.strftime('%Y-%m-%d')}\'" if log_date_limit is not None else None
326
+ print(f"Deleting logs with filters: Date limit: {log_date_limit}, Max no. of entries: {log_limit} INFO logs")
327
+ log_date_limit_filter = f"AND created_at >= \'{log_date_limit.strftime('%Y-%m-%d')}\'" if log_date_limit is not None else ''
328
+ log_limit_filter = f"LIMIT {log_limit}" if log_limit is not None else ""
327
329
  delete_filter = f"WHERE task_id = {self.task_id} " \
330
+ f"AND log_level NOT IN ('CRITICAL', 'ERROR') " \
328
331
  f"AND reload_id NOT IN (SELECT reload_id FROM (SELECT reload_id FROM `task_execution_log` WHERE task_id = {self.task_id} " \
329
- f"AND log_level != 'CRITICAL' " \
330
- f"AND log_level != 'ERROR' " \
331
- f"{log_date_limit_filter if log_date_limit_filter is not None else ''} " \
332
- f"ORDER BY created_at DESC {f' LIMIT {log_limit} ' if log_limit is not None else ''}) temp)"
332
+ f"{log_date_limit_filter} " \
333
+ f"ORDER BY created_at DESC {log_limit_filter}) temp)"
333
334
  resp = self.mysql.delete(table="task_execution_log", filter=delete_filter)
334
335
  print(resp)
335
336
  print(f'{datetime.datetime.now()} - Task finished')
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: brynq_sdk_task_scheduler
3
+ Version: 4.0.8
4
+ Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
+ Author: BrynQ
6
+ Author-email: support@brynq.com
7
+ License: BrynQ License
8
+ Requires-Dist: brynq-sdk-brynq<5,>=4
9
+ Requires-Dist: brynq-sdk-functions<3,>=2
10
+ Requires-Dist: brynq-sdk-mysql<4,>=3
11
+ Requires-Dist: brynq-sdk-mandrill<4,>=2
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: description
15
+ Dynamic: license
16
+ Dynamic: requires-dist
17
+ Dynamic: summary
18
+
19
+ Code to execute tasks in the BrynQ.com platform with the task scheduler
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_task_scheduler',
5
- version='4.0.7',
5
+ version='4.0.8',
6
6
  description='Code to execute tasks in BrynQ.com with the task scheduler',
7
7
  long_description='Code to execute tasks in the BrynQ.com platform with the task scheduler',
8
8
  author='BrynQ',
@@ -1,10 +0,0 @@
1
- Metadata-Version: 1.0
2
- Name: brynq_sdk_task_scheduler
3
- Version: 4.0.7
4
- Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
- Home-page: UNKNOWN
6
- Author: BrynQ
7
- Author-email: support@brynq.com
8
- License: BrynQ License
9
- Description: Code to execute tasks in the BrynQ.com platform with the task scheduler
10
- Platform: UNKNOWN
@@ -1,10 +0,0 @@
1
- Metadata-Version: 1.0
2
- Name: brynq-sdk-task-scheduler
3
- Version: 4.0.7
4
- Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
- Home-page: UNKNOWN
6
- Author: BrynQ
7
- Author-email: support@brynq.com
8
- License: BrynQ License
9
- Description: Code to execute tasks in the BrynQ.com platform with the task scheduler
10
- Platform: UNKNOWN