brynq-sdk-task-scheduler 3.0.8__tar.gz → 3.0.10__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_task_scheduler
3
- Version: 3.0.8
3
+ Version: 3.0.10
4
4
  Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -221,22 +221,6 @@ class TaskScheduler(BrynQ):
221
221
 
222
222
  print('{} at line: {}'.format(message, line_number))
223
223
 
224
- # Put everything together in the payload for ElasticSearch and send it
225
- payload = {
226
- 'task_id': self.task_id,
227
- 'reload_id': self.run_id,
228
- 'started_at': datetime.datetime.now().isoformat(),
229
- 'partner_id': self.partner_id,
230
- 'customer_id': self.customer_id,
231
- 'customer': self.customer,
232
- 'file_name': file_name,
233
- 'function_name': function_name,
234
- 'line_number': line_number,
235
- 'task_loglevel': self.loglevel,
236
- 'line_loglevel': loglevel,
237
- 'message': message
238
- }
239
-
240
224
  # Count the errors for relevant log levels
241
225
  if loglevel == 'ERROR' or loglevel == 'CRITICAL':
242
226
  self.error_count += 1
@@ -244,6 +228,21 @@ class TaskScheduler(BrynQ):
244
228
  if self.elastic_enabled:
245
229
  # For Elastic, we need to have the data in JSON format. Handling different data types and preparing extra payload information based on the data type
246
230
  # If the data is just a series, count rows, columns and cells
231
+ # Put everything together in the payload for ElasticSearch and send it
232
+ payload = {
233
+ 'task_id': self.task_id,
234
+ 'reload_id': self.run_id,
235
+ 'started_at': datetime.datetime.now().isoformat(),
236
+ 'partner_id': self.partner_id,
237
+ 'customer': self.customer,
238
+ 'file_name': file_name,
239
+ 'function_name': function_name,
240
+ 'line_number': line_number,
241
+ 'task_loglevel': self.loglevel,
242
+ 'line_loglevel': loglevel,
243
+ 'message': message
244
+ }
245
+
247
246
  if isinstance(data, pd.Series):
248
247
  dataframe = pd.DataFrame(data).T
249
248
  extra_payload = {
@@ -374,7 +373,6 @@ class TaskScheduler(BrynQ):
374
373
  'reload_id': self.run_id,
375
374
  'started_at': datetime.datetime.now().isoformat(),
376
375
  'partner_id': self.partner_id,
377
- 'customer_id': self.customer_id,
378
376
  'customer': self.customer,
379
377
  'file_name': file_name,
380
378
  'function_name': function_name,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-task-scheduler
3
- Version: 3.0.8
3
+ Version: 3.0.10
4
4
  Summary: Code to execute tasks in BrynQ.com with the task scheduler
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -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='3.0.8',
5
+ version='3.0.10',
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',