Skip to Content
3
Former Member
Nov 24, 2016 at 12:21 PM

Data Hub cleanup happens immediately

169 Views

Hi, I have tried to enable Data Hub cleanup to occur after 5 minutes:

 datahub.cleanup.rawitem.enabled=true
 datahub.cleanup.canonicalitem.enabled=true
 datahub.cleanup.targetitem.enabled=true
 datahub.cleanup.publisheditems.enabled=true
 
 datahub.cleanup.canonicalitem.time.delay=500

but instead it seems to happen immediately after publication:

 2016-11-24 11:09:39,488 [DEBUG] [c.h.d.s.i.DefaultEventPublicationService] Publishing data hub event : TargetSystemPublicationStartedEvent{publicationId=2569}
 2016-11-24 11:09:39,499 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductAttributes, last processed item id: 0 page size: 1000
 2016-11-24 11:09:39,501 [INFO] [c.h.d.c.c.i.DefaultExportClient] Authenticating publish to HybrisApparelCoreInstallation
 2016-11-24 11:09:39,510 [INFO] [c.h.d.c.c.i.DefaultExportClient] Exporting Export_HybrisApparelCoreInstallation_4852137577 name to HybrisApparelCoreInstallation
 2016-11-24 11:09:39,517 [DEBUG] [c.h.d.c.c.i.DefaultExportClient] Status of the response from publish to target system: HybrisApparelCoreInstallation, 200
 2016-11-24 11:09:39,595 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2573/MarketplaceVendorToWarehousesRelation?target_name=HybrisApparelCoreInstallation&fields=code,warehouses&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:39,609 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: MarketplaceVendorToWarehousesRelation, last processed item id: 0 page size: 1000
 2016-11-24 11:09:39,674 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2573/WarehouseUpdate?target_name=HybrisApparelCoreInstallation&fields=baseStores,warehouse_id,name&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:39,688 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: WarehouseUpdate, last processed item id: 0 page size: 1000
 2016-11-24 11:09:39,752 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2573/VariantProduct?target_name=HybrisApparelCoreInstallation&fields=description,ean,hs_code,catalogVersion,vendor_id,test2,manufacturerName,name,manufacturerAID,test,supercategories,final_sale,source_shop_id,sku,avalara_tax_code&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:39,766 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: VariantProduct, last processed item id: 0 page size: 1000
 2016-11-24 11:09:39,927 [INFO] [c.h.d.r.r.CoreAdapterResource] Received complete publication request from Core adapter for publicationId: 2573
 2016-11-24 11:09:39,969 [DEBUG] [c.h.d.c.a.i.CoreAdapterService] Creating impex for export to: http://localhost:9001/datahubadapter
 2016-11-24 11:09:39,979 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductAttributes, last processed item id: 0 page size: 1000
 2016-11-24 11:09:39,980 [INFO] [c.h.d.c.c.i.DefaultExportClient] Authenticating publish to HybrisApparelCoreInstallation
 2016-11-24 11:09:39,986 [INFO] [c.h.d.c.c.i.DefaultExportClient] Exporting Export_HybrisApparelCoreInstallation_1584801549 name to HybrisApparelCoreInstallation
 2016-11-24 11:09:39,993 [DEBUG] [c.h.d.c.c.i.DefaultExportClient] Status of the response from publish to target system: HybrisApparelCoreInstallation, 200
 2016-11-24 11:09:40,064 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2574/ProductTaxonomyCategoryRelation?target_name=HybrisApparelCoreInstallation&fields=categories,products&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:40,076 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductTaxonomyCategoryRelation, last processed item id: 0 page size: 1000
 2016-11-24 11:09:40,152 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2574/ProductShippingRestrictionCountriesRelation?target_name=HybrisApparelCoreInstallation&fields=restricted_shipping_destinations,product_code&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:40,164 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductShippingRestrictionCountriesRelation, last processed item id: 0 page size: 1000
 2016-11-24 11:09:40,335 [INFO] [c.h.d.r.r.CoreAdapterResource] Received complete publication request from Core adapter for publicationId: 2574
 2016-11-24 11:09:40,374 [DEBUG] [c.h.d.c.a.i.CoreAdapterService] Creating impex for export to: http://localhost:9001/datahubadapter
 2016-11-24 11:09:40,384 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductAttributes, last processed item id: 0 page size: 1000
 2016-11-24 11:09:40,385 [INFO] [c.h.d.c.c.i.DefaultExportClient] Authenticating publish to HybrisApparelCoreInstallation
 2016-11-24 11:09:40,393 [INFO] [c.h.d.c.c.i.DefaultExportClient] Exporting Export_HybrisApparelCoreInstallation_1783656354 name to HybrisApparelCoreInstallation
 2016-11-24 11:09:40,399 [DEBUG] [c.h.d.c.c.i.DefaultExportClient] Status of the response from publish to target system: HybrisApparelCoreInstallation, 200
 2016-11-24 11:09:40,469 [INFO] [c.h.d.r.r.CoreAdapterResource] Received request /2576/ProductMedia?target_name=HybrisApparelCoreInstallation&fields=thumbnail,others,catalogVersion,picture,sku&locale=&lastProcessedId=0&pageSize=1000
 2016-11-24 11:09:40,482 [DEBUG] [c.h.d.r.j.i.DefaultTargetItemJpaRepository] Finding Target Items for Publication for class: ProductMedia, last processed item id: 0 page size: 1000
 2016-11-24 11:09:40,634 [INFO] [c.h.d.r.r.CoreAdapterResource] Received complete publication request from Core adapter for publicationId: 2576
 2016-11-24 11:09:40,663 [DEBUG] [c.h.d.s.i.DefaultEventPublicationService] Publishing data hub event : TargetSystemPublicationCompletedEvent{publicationId=2569}
 2016-11-24 11:09:40,671 [INFO] [c.h.d.c.j.AbstractJdbcCleanupService] Successfully published items cleanup: [DELETE FROM `PublicationError` WHERE `canonicalitempublicationstatus` IN (:ids)]: 0 records were deleted
 2016-11-24 11:09:40,671 [INFO] [c.h.d.c.j.AbstractJdbcCleanupService] Successfully published items cleanup: [DELETE FROM `CanItemPubStatus` WHERE `canonicalitem` IN (:secondaryids)]: 130 records were deleted
 2016-11-24 11:09:40,671 [INFO] [c.h.d.c.j.AbstractJdbcCleanupService] Successfully published items cleanup: [DELETE FROM `CanonicalItem` WHERE `id` IN (:secondaryids)]: 130 records were deleted
 2016-11-24 11:09:40,671 [DEBUG] [c.h.d.s.i.DefaultEventPublicationService] Publishing data hub event : PublicationCompletedEvent{actionId=2515}
 2016-11-24 11:09:40,678 [INFO] [c.h.d.c.j.AbstractJdbcCleanupService] TargetItem cleanup: [DELETE FROM TargetItem WHERE targetsystempublication IN (:ids)]: 162 records were deleted

Is this a bug? Or am I doing it wrong? Thanks!