====== Marc Cain ======
xml feed is converted to csv on sg01 (bash marccain/transform_feed.sh), after conversion start feed import on index03: python /mnt/storage/var/live/indexer/scripts/update/feedUpdate.py /mnt/storage/var/etc/v3/feedUpdate.json 2788
====== Changes at Post Processor / Creating new Post Processor ======
===== Implementation =====
== 1. clone V4 Feed Import project ==
== 2. Switch directories ==
cd src/feed_import/
== 3. Create File or open Existing ==
touch post_proc_
* change processor class name
* create class that inherits from DefaultPostProcessor
* change process method (depending on usecase)\\
== 4. in case of a new processor file ==
* add corresponding import to post_proc.py
===== Testing =====
scp
**NOTE:** (in case of change: rename existing file before copying in case of rollback)
== 5. Use feed import calls (index03) ==
python /mnt/storage/var/live/indexer/scripts/update/feedUpdate.py /mnt/storage/var/etc/v3/feedUpdate.json
/home/picalike/.local/bin/v3_feed_import /mnt/storage/var/etc/v3/feedImport.json
python /mnt/storage/var/live/indexer/scripts/update/feedUpdateList.py /mnt/storage/var/etc/v3/feedUpdate.json
**NOTE:** check if your feed is currently updated and copy update id if thats the case
python /mnt/storage/var/live/indexer/scripts/update/feedUpdateCancel.py /mnt/storage/var/etc/v3/feedUpdate.json
===== Post Testing =====
cd /some/path/v4-feed-import/
*
git tag --> get next version number
*
git tag version-
*
git push --tags
python3 setup.py sdist
* copy created package (lives in /some/path/v4-feed-import/dist/) to index03:/tmp/
* On index03
pip install /tmp/feed_import-0.1.15.tar.gz --no-deps --user
* run feed import again(Step 5) and **verify** everything works correctly by checking the data in the **mongoDB**
cd /home/picalike/.local/lib/python2.7/site-packages/feed_import
vim post_proc_hirmer.py
2. **Logic**
'''
The solution below is used to mark sale products for filtering them out of product responses via the API
Product state can be 0 = product not available
1 = product available
2 = product in sale ~= handling similar to not available in further processing
'''
if avail and row[reduced_col] != "ja":
sizes_avail.append("1")
row[reduced_col] = "nein"
elif row[reduced_col] == "ja":
sizes_avail.append("2")
else:
sizes_avail.append("0")
There are two steps in the implementation.