brynq-sdk-task-scheduler 4.0.6__tar.gz → 4.0.7__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.
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/PKG-INFO +1 -1
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler/task_scheduler.py +12 -5
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/PKG-INFO +1 -1
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/setup.py +1 -1
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler/__init__.py +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/not-zip-safe +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/requires.txt +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/brynq_sdk_task_scheduler.egg-info/top_level.txt +0 -0
- {brynq_sdk_task_scheduler-4.0.6 → brynq_sdk_task_scheduler-4.0.7}/setup.cfg +0 -0
|
@@ -254,8 +254,12 @@ class TaskScheduler:
|
|
|
254
254
|
filter=f'WHERE `reload_id` = {self.run_id}')
|
|
255
255
|
if self.email_after_errors:
|
|
256
256
|
self.email_errors(failed=True)
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
|
|
258
|
+
# Remove the temp values from the variables table (legacy), if it doesn't exist, ignore the error. In that case it will already be flushed by the API endpoint
|
|
259
|
+
try:
|
|
260
|
+
self.mysql.raw_query(f'UPDATE `task_variables` SET temp_value = null WHERE task_id = {self.task_id}', insert=True)
|
|
261
|
+
except Exception as e:
|
|
262
|
+
pass
|
|
259
263
|
|
|
260
264
|
# Start the chained tasks if it there are tasks which should start if this one is failed
|
|
261
265
|
self.start_chained_tasks(finished_task_status='FAILED')
|
|
@@ -308,8 +312,11 @@ class TaskScheduler:
|
|
|
308
312
|
values=['FinishedSuccess', f'{datetime.datetime.now()}'],
|
|
309
313
|
filter=f'WHERE `reload_id` = {self.run_id}')
|
|
310
314
|
|
|
311
|
-
# Remove the temp values from the variables table
|
|
312
|
-
|
|
315
|
+
# Remove the temp values from the variables table if it exists (legacy)
|
|
316
|
+
try:
|
|
317
|
+
self.mysql.raw_query(f'UPDATE `task_variables` SET temp_value = null WHERE task_id = {self.task_id}', insert=True)
|
|
318
|
+
except Exception as e:
|
|
319
|
+
pass
|
|
313
320
|
|
|
314
321
|
# Start the new task if it there is a task which should start if this one is finished
|
|
315
322
|
self.start_chained_tasks(finished_task_status='SUCCESS')
|
|
@@ -381,7 +388,7 @@ class TaskScheduler:
|
|
|
381
388
|
logs = []
|
|
382
389
|
logs.append(payload)
|
|
383
390
|
with open(log_file_path, 'w') as f:
|
|
384
|
-
json.dump(logs, f)
|
|
391
|
+
json.dump(logs, f, default=str)
|
|
385
392
|
except Exception as e:
|
|
386
393
|
print(f"Error saving log locally: {e}")
|
|
387
394
|
|
|
@@ -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.
|
|
5
|
+
version='4.0.7',
|
|
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',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|