Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to execute multiple importers serially #24

Open
shadyvb opened this issue Apr 29, 2016 · 2 comments
Open

Add ability to execute multiple importers serially #24

shadyvb opened this issue Apr 29, 2016 · 2 comments

Comments

@shadyvb
Copy link
Contributor

shadyvb commented Apr 29, 2016

We can have a configuration file that describes arguments and order of importers to execute. That'd would make it easier to separate importer functionality more freely, specially in cases of DB where frequent datasource access is not a problem ( unlike file datasources ).

@tcrsavage
Copy link
Contributor

A nice idea in theory but I there are a couple of things for me which I don't like about this.

One is that we're just creating a configuration file which would have to be version controlled anyway and a bunch of extra proprietary handling which devs would have to learn. Setting default args on the individual importers would give most of the same flexibility.

Generally these importers don't have many variable arguments, and the ones they do have are shared.

I reckon we could meet most requirements by having a cli command method which lets you pass in a list of importers and have them share global arguments. For cases where there are conflicting arg requirements, those args probably aren't generally going to need to be variable and can be set on the importer it's self.

@shadyvb
Copy link
Contributor Author

shadyvb commented May 4, 2016

True.

So you're saying we should target something like this ?
wp hmci batch posts,comments,thumbnails --db-host=xx --comment_statuses=approved --disable-intermediate-sizes

I'd probably want to throw in some pre/post actions as well, so it can be used for checking, pausing, or backing up database after each step, ie:
wp hmci batch posts,comments,thumbnails --blabla --pre="wp db export /tmp/$HMCI_CURRENT.sql" --post="say Cheeese!"
or even a dedicated DB backup argument:
wp hmci batch posts,comments,thumbnails --db-back=/tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants