Facebook
From LP, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 22
  1. *** Log file does not exist: /usr/local/airflow/logs/lipham_shopify_promotion_and_discount_push/push_discount_to_shopify/2020-11-06T07:58:22.153427+00:00/1.log
  2. *** Fetching from: http://c07c705fd854:8793/log/lipham_shopify_promotion_and_discount_push/push_discount_to_shopify/2020-11-06T07:58:22.153427+00:00/1.log
  3.  
  4. [2020-11-06 08:00:04,053] {{taskinstance.py:655}} INFO - Dependencies all met for <TaskInstance: lipham_shopify_promotion_and_discount_push.push_discount_to_shopify 2020-11-06T07:58:22.153427+00:00 [queued]>
  5. [2020-11-06 08:00:04,092] {{taskinstance.py:655}} INFO - Dependencies all met for <TaskInstance: lipham_shopify_promotion_and_discount_push.push_discount_to_shopify 2020-11-06T07:58:22.153427+00:00 [queued]>
  6. [2020-11-06 08:00:04,092] {{taskinstance.py:866}} INFO -
  7. --------------------------------------------------------------------------------
  8. [2020-11-06 08:00:04,092] {{taskinstance.py:867}} INFO - Starting attempt 1 of 1
  9. [2020-11-06 08:00:04,092] {{taskinstance.py:868}} INFO -
  10. --------------------------------------------------------------------------------
  11. [2020-11-06 08:00:04,115] {{taskinstance.py:887}} INFO - Executing <Task(PushPromotionAndDiscount): push_discount_to_shopify> on 2020-11-06T07:58:22.153427+00:00
  12. [2020-11-06 08:00:04,122] {{standard_task_runner.py:53}} INFO - Started process 123 to run task
  13. [2020-11-06 08:00:04,266] {{logging_mixin.py:112}} INFO - Running %s on host %s <TaskInstance: lipham_shopify_promotion_and_discount_push.push_discount_to_shopify 2020-11-06T07:58:22.153427+00:00 [running]> c07c705fd854
  14. [2020-11-06 08:00:04,293] {{dte_operator.py:151}} INFO - PRE EXECUTE
  15. [2020-11-06 08:00:04,293] {{dte_operator.py:480}} INFO - > Getting data in storage of previous task
  16. [2020-11-06 08:00:04,304] {{dte_operator.py:485}} DEBUG - File name is: /tmp/lipham_shopify_promotion_and_discount_push_2011060758
  17. [2020-11-06 08:00:04,315] {{dte_operator.py:741}} INFO - # Get credentials of Shopify AdminAPI
  18. [2020-11-06 08:00:04,315] {{dte_operator.py:112}} INFO - MATCH (:Company {sysid: $company_id})-[:IN_SYNC_WITH]->(shopify:Shopify) WHERE shopify.status = 'ACTIVE' RETURN shopify
  19. [2020-11-06 08:00:04,315] {{dte_operator.py:113}} INFO - {'company_id': 11}
  20. [2020-11-06 08:00:04,327] {{logging_mixin.py:112}} INFO - [2020-11-06 08:00:04,327] {{base_hook.py:84}} INFO - Using connection to: id: neo4j_read_default. Host: bolt://integration-branch-backend.systum.com:7688, Port: None, Schema: None, Login: neo4j, Password: XXXXXXXX, extra: None
  21. [2020-11-06 08:00:04,338] {{dte_operator.py:127}} DEBUG - [{'shopify': {'APIKey': 'e247ebd5354b6d9ec862474f2c3be321', 'password': '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', 'apiVersion': '2020-07', 'domain': 'lpsystumdev.myshopify.com', 'storefrontAccessToken': 'temp_value_to_prevent_exception_on_integration_airflow', 'sharedSecret': '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', 'status': 'ACTIVE'}}]
  22. [2020-11-06 08:00:04,338] {{logging_mixin.py:112}} INFO - set up new configuration for neo4j database.
  23. [2020-11-06 08:00:04,338] {{discount_operators.py:268}} INFO - START PUSHING PROMOTION AND DISCOUNT TO SHOPIFY
  24. [2020-11-06 08:00:04,340] {{discount_operators.py:269}} DEBUG - {'create': [],
  25.  'delete': [{'applyDiscountRule': 'All Sales',
  26.              'code': 'Create new and nupdate',
  27.              'customFields': '[{"shopify_price_rule_id": 837885657285}]',
  28.              'customers': [],
  29.              'dateCreated': 1604643945.824694,
  30.              'description': 'Testing create new promotion',
  31.              'discounts': [{'companyId': 11,
  32.                             'name': 'WORK IS FUN',
  33.                             'percentRate': 5.0,
  34.                             'status': 'ACTIVE',
  35.                             'sysid': 205216},
  36.                            {'companyId': 11,
  37.                             'name': '10%',
  38.                             'percentRate': 10.0,
  39.                             'status': 'ACTIVE',
  40.                             'sysid': 1016},
  41.                            {'companyId': 11,
  42.                             'description': '',
  43.                             'name': 'DLMD11',
  44.                             'percentRate': 12.0,
  45.                             'status': 'ACTIVE',
  46.                             'sysid': 1020},
  47.                            {'companyId': 11,
  48.                             'name': 'WORKISFUN',
  49.                             'percentRate': 5.0,
  50.                             'status': 'ACTIVE',
  51.                             'sysid': 205217}],
  52.              'endDate': 1605286799.0,
  53.              'items': [{'customFields': '[{"shopify_variant_id": '
  54.                                         '37085697310917}, {"qbo_item_id": '
  55.                                         '"1197"}]',
  56.                         'sysid': 53922},
  57.                        {'customFields': '[{"shopify_variant_id": '
  58.                                         '37085697278149}, {"qbo_item_id": '
  59.                                         '"1196"}]',
  60.                         'sysid': 53923}],
  61.              'minValue': 0.0,
  62.              'startDate': 1604595600.0,
  63.              'status': 'DELETED',
  64.              'sysid': 1150,
  65.              'third_party_id': 837885657285,
  66.              'type': 'DISCOUNT_PERCENT'}],
  67.  'update': []}
  68. [2020-11-06 08:00:04,341] {{discount_operators.py:290}} INFO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  69. [2020-11-06 08:00:04,342] {{discount_operators.py:291}} DEBUG - {'applyDiscountRule': 'All Sales',
  70.  'code': 'Create new and nupdate',
  71.  'customFields': '[{"shopify_price_rule_id": 837885657285}]',
  72.  'customers': [],
  73.  'dateCreated': 1604643945.824694,
  74.  'description': 'Testing create new promotion',
  75.  'discounts': [{'companyId': 11,
  76.                 'name': 'WORK IS FUN',
  77.                 'percentRate': 5.0,
  78.                 'status': 'ACTIVE',
  79.                 'sysid': 205216},
  80.                {'companyId': 11,
  81.                 'name': '10%',
  82.                 'percentRate': 10.0,
  83.                 'status': 'ACTIVE',
  84.                 'sysid': 1016},
  85.                {'companyId': 11,
  86.                 'description': '',
  87.                 'name': 'DLMD11',
  88.                 'percentRate': 12.0,
  89.                 'status': 'ACTIVE',
  90.                 'sysid': 1020},
  91.                {'companyId': 11,
  92.                 'name': 'WORKISFUN',
  93.                 'percentRate': 5.0,
  94.                 'status': 'ACTIVE',
  95.                 'sysid': 205217}],
  96.  'endDate': 1605286799.0,
  97.  'items': [{'customFields': '[{"shopify_variant_id": 37085697310917}, '
  98.                             '{"qbo_item_id": "1197"}]',
  99.             'sysid': 53922},
  100.            {'customFields': '[{"shopify_variant_id": 37085697278149}, '
  101.                             '{"qbo_item_id": "1196"}]',
  102.             'sysid': 53923}],
  103.  'minValue': 0.0,
  104.  'startDate': 1604595600.0,
  105.  'status': 'DELETED',
  106.  'sysid': 1150,
  107.  'third_party_id': 837885657285,
  108.  'type': 'DISCOUNT_PERCENT'}
  109. [2020-11-06 08:00:04,342] {{base_operator.py:75}} DEBUG - Endpoint: https://lpsystumdev.myshopify.com/admin/api/2020-07/price_rules/837885657285.json
  110. [2020-11-06 08:00:04,342] {{base_operator.py:76}} DEBUG - Method: DELETE
  111. [2020-11-06 08:00:04,342] {{base_operator.py:77}} DEBUG - Payload: None
  112. [2020-11-06 08:00:04,542] {{base_operator.py:86}} ERROR - HTTP Error: 404 Client Error: Not Found for url: https://lpsystumdev.myshopify.com/admin/api/2020-07/price_rules/837885657285.json
  113. [2020-11-06 08:00:04,542] {{base_operator.py:91}} ERROR - {'errors': 'Not Found'}
  114. [2020-11-06 08:00:04,542] {{discount_operators.py:298}} DEBUG - {'discounts': [{'name': 'WORK IS FUN', 'sysid': 205216, 'percentRate': 5.0, 'status': 'ACTIVE', 'companyId': 11}, {'name': '10%', 'sysid': 1016, 'percentRate': 10.0, 'status': 'ACTIVE', 'companyId': 11}, {'name': 'DLMD11', 'description': '', 'sysid': 1020, 'percentRate': 12.0, 'status': 'ACTIVE', 'companyId': 11}, {'name': 'WORKISFUN', 'sysid': 205217, 'percentRate': 5.0, 'status': 'ACTIVE', 'companyId': 11}], 'items': [{'sysid': 53922, 'customFields': '[{"shopify_variant_id": 37085697310917}, {"qbo_item_id": "1197"}]'}, {'sysid': 53923, 'customFields': '[{"shopify_variant_id": 37085697278149}, {"qbo_item_id": "1196"}]'}], 'customers': [], 'endDate': 1605286799.0, 'applyDiscountRule': 'All Sales', 'description': 'Testing create new promotion', 'sysid': 1150, 'customFields': '[{"shopify_price_rule_id": 837885657285}]', 'minValue': 0.0, 'code': 'Create new and nupdate', 'dateCreated': 1604643945.824694, 'status': 'DELETED', 'type': 'DISCOUNT_PERCENT', 'startDate': 1604595600.0, 'third_party_id': 837885657285}
  115. [2020-11-06 08:00:04,542] {{dte_operator.py:788}} ERROR - Failed on deleting price rule on Shopify
  116. [2020-11-06 08:00:04,543] {{logging_mixin.py:112}} WARNING - Traceback (most recent call last):
  117. [2020-11-06 08:00:04,543] {{logging_mixin.py:112}} WARNING -   File "/usr/local/airflow/plugins/operators/customized/shopify/discount_operators.py", line 293, in execute
  118.     self.delete_price_rule(promotion.get('third_party_id'))
  119. [2020-11-06 08:00:04,543] {{logging_mixin.py:112}} WARNING -   File "/usr/local/airflow/plugins/operators/customized/shopify/discount_operators.py", line 257, in delete_price_rule
  120.     raise Exception("Failed on deleting price rule on Shopify")
  121. [2020-11-06 08:00:04,543] {{logging_mixin.py:112}} WARNING - Exception: Failed on deleting price rule on Shopify
  122. [2020-11-06 08:00:04,543] {{dte_operator.py:789}} ERROR - None
  123. [2020-11-06 08:00:04,543] {{dte_operator.py:557}} INFO - Push item [{'sysid': 1150}] back to RateLimitingQueue [lipham.systum.com_shopify_promotion_pushing]
  124. [2020-11-06 08:00:04,551] {{logging_mixin.py:112}} INFO - [2020-11-06 08:00:04,551] {{base_hook.py:84}} INFO - Using connection to: id: redis_default. Host: redis, Port: 6379, Schema: None, Login: None, Password: None, extra: XXXXXXXX
  125. [2020-11-06 08:00:04,554] {{dte_operator.py:571}} INFO - Successfully push item back to RateLimitingQueue [lipham.systum.com_shopify_promotion_pushing]
  126. [2020-11-06 08:00:04,554] {{dte_operator.py:378}} INFO - POST EXECUTE
  127. [2020-11-06 08:00:04,554] {{dte_operator.py:379}} DEBUG -
  128. Failures on this task:
  129. [{'data': {'sysid': 1150}, 'reason': 'Failed on deleting price rule on Shopify', 'sysid': 1150, 'task_id': 'push_discount_to_shopify'}]
  130. [2020-11-06 08:00:04,563] {{logging_mixin.py:112}} INFO - [2020-11-06 08:00:04,563] {{file_processing_service.py:13}} INFO - [FileHandler] Acquire lock: lipham_shopify_promotion_and_discount_push_2011060758
  131. [2020-11-06 08:00:05,565] {{dte_operator.py:430}} INFO - > Saving data into storage
  132. [2020-11-06 08:00:05,565] {{dte_operator.py:480}} INFO - > Getting data in storage of previous task
  133. [2020-11-06 08:00:05,573] {{dte_operator.py:485}} DEBUG - File name is: /tmp/lipham_shopify_promotion_and_discount_push_2011060758
  134. [2020-11-06 08:00:05,573] {{logging_mixin.py:112}} INFO - [2020-11-06 08:00:05,573] {{file_processing_service.py:23}} INFO - [FileHandler] Create json data file: lipham_shopify_promotion_and_discount_push_2011060758
  135. [2020-11-06 08:00:05,574] {{dte_operator.py:443}} INFO - Done
  136. [2020-11-06 08:00:05,584] {{taskinstance.py:1048}} INFO - Marking task as SUCCESS.dag_id=lipham_shopify_promotion_and_discount_push, task_id=push_discount_to_shopify, execution_date=20201106T075822, start_date=20201106T080004, end_date=20201106T080005
  137. [2020-11-06 08:00:14,000] {{logging_mixin.py:112}} INFO - [2020-11-06 08:00:13,999] {{local_task_job.py:103}} INFO - Task exited with return code 0