Closed (won't fix)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 May 2013 at 22:04 UTC
Updated:
1 Aug 2016 at 13:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bdone commentedComment #2
bdone commentedhere's a first pass at something that achieves this
Comment #3
bdone commentedskipping MigrateSQLMap's delete() method is logging lots of undefined hashes in messages:
Comment #4
bdone commentedstill not sure about the implementation, but a usage example with MigrateSQLMap:
Comment #5
bdone commentedany other plans, or suggestions, for message logging in continuous migrations?
Comment #6
mikeryanCan you explain the motivation here? What's the scenario where subsequent re-migrations of the same item generate different messages - i.e., why do you want to keep a history of the messages? It seems like an awfully narrow use case to include as a general feature.
Thanks.
Comment #7
bdone commented@mike: I’ll try to explain the motivation best i can. I'm using a custom node migration, with system of record of source, using track_changes, and no high water mark. The same migration is used repeatedly (weekly, soon to be daily). Things work fine as they are, except for retaining message logging between migrations.
The imported/unimported counts are getting out of sync, which makes sense per #1732680: removing records from source causes unimported count to be negative. But, more importantly, between re-migrations, Migration class is calling delete() which removes messages prior to each import. In this issue, I was trying to append messages for logging purposes.
Have you ever retained messages, before truncating the table? I've hacked around a bit trying an INSERT INTO to replicate the message and mappings tables, and even tried to register those migrations dynamically with an appended timestamp, like MyMigration_REQUEST_TIME. There were some issues there that i can’t recall specifically, but i beleive having the same sourceid in other mapping tables was creating duplicate nodes from the source.
I talked with moshe in portland and thru conversation, he thought migrate was not really setup for this. But, maybe there's another approach you've already come up with?
Comment #8
mikeryanI've never seen a reason to retain messages. Usually if there's a message and an item is reimported, it will either generate the exact same message again, or if whatever condition caused the condition is fixed, the message disappears (and good riddance!). I'm curious what your use case is where a history of messages would be useful (especially considering there's no information in the message table to help tell you which run of the import resulted in a given message).
Comment #9
13rac1 commentedI agree with mikeryan. This is use-case is too narrow, plus no one else has commented on this functionality since it was posted. Closing. Re-open to provide a wider use-case.
Comment #10
rhabbachi commentedRerolled the above patch. We are trying to add some user feedback to our, migrate based, solution for harvesting data from remote/local sorces.dkan_harvest and this patch might come in handy.