Beispiel #1
0
 def on_owner_delete(data):
     es_sync_util.update_by_query(
         index=opt['index'],
         doc_type=opt['type'],
         data=data,
         projection=owner_cursor.projection,
         _filter=owner_cursor.filter,
         _as=used_car_cursor.pop_fields.get('owner').get('as'))
Beispiel #2
0
 def on_car_keeper_delete(data):
     es_sync_util.update_by_query(
         index=opt['index'],
         doc_type=opt['type'],
         data=data,
         projection=car_keeper_cursor.projection,
         _filter=car_keeper_cursor.filter,
         _as=car_change_plan_cursor.pop_fields.get('car_keeper').get('as'))
Beispiel #3
0
 def on_merchant_update(data):
     es_sync_util.update_by_query(index=opt['index'],
                                  doc_type=opt['type'],
                                  data=data,
                                  projection=merchant_cursor.projection,
                                  _filter=merchant_cursor.filter,
                                  pop_fields=merchant_cursor.pop_fields,
                                  _as=_.get(car_offer_cursor.pop_fields,
                                            'merchant.as'))
Beispiel #4
0
 def on_support_delete(data):
     _as = _.get(used_car_offer_cursor.pop_fields, 'appraiser.as') or _.get(
         used_car_offer_cursor.pop_fields, 'appraiser.local_field')
     es_sync_util.update_by_query(index=opt['index'],
                                  doc_type=opt['type'],
                                  data=data,
                                  projection=_.get(
                                      used_car_offer_cursor.pop_fields,
                                      'appraiser.projection'),
                                  _as=_as)
Beispiel #5
0
 def on_support_delete(data):
     _as = _.get(merchant_cursor.pop_fields, 'support.as') or _.get(
         merchant_cursor.pop_fields, 'support.local_field')
     es_sync_util.update_by_query(index=opt['index'],
                                  doc_type=opt['type'],
                                  data=data,
                                  projection=_.get(
                                      merchant_cursor.pop_fields,
                                      'support.projection'),
                                  _as=_as)
Beispiel #6
0
 def on_update(data):
     es_sync_util.update_by_query(index=opt['index'],
                                  doc_type=opt['type'],
                                  data=data,
                                  projection=wx_order_cursor.projection,
                                  _filter=wx_order_cursor.filter)