Problem with CLI Import

mercadeoshop

New Member
Hello, i just active CLI Import but when i upload a file i get the error:
  • Unable to move the uploaded file!
What is the folder where the script upload the file? or what is this error?
 
Thank you very much. One question, the CLI Import generate some type of log or report for know if was some type of error with the importation?
 
@mercadeoshop - you can make it log in a file if you wish, as instead of sending the output of the command to nowehere (>/dev/null) you could send it to a file (>/var/log/cli-import.txt)
However, if something fails, it will be logged into the application log.
 
I added but dont show anything in the file, where can i find the application log? because foe example im uploading a 10 suscribers list and only import 5 but i dont know why, and say the 10 was imported
 
the files are moved into apps/common/runtime/list-import-queue folder, so make sure that exists and is chmoded to 0777/

The directory name that I find my files in is apps/common/runtime/list-import (no -queue on the end, surmising that there was a name change because -queue doesn't exist and all of my imports have worked). My question is: After an import has successfully completed can I delete the files in this directory? There are a lot of them there because all of my clients are importing from mailchimp. I'm thinking I can but want to be sure.
 
Great, thanks. However, someplace I stumbled on criteria for the file name of files I programmatically write to that directory for importing by the cron job. I thought the reference said the Unique ID of the list, but that doesn't work and I can't find the reference again. So what's the file name supposed to be?
 
@Henry - When you upload for queue processing, the files will be moved in apps/common/runtime/list-import-queue/LIST_UID.{csv | txt}
When you upload for web processing, the file is moved in apps/common/runtime/list-import/file-original-name.{csv | txt}

So name change only occurs for queued imports.
 
OK, then I must have really missed something. I have a customer who gets a number of visitors to his website who complete a form, and one of the fields on that form is "Add me to your mailing list". Best solution I have been able to come up with so far is to create a csv file nightly from the visitors who requested to be added, then have that list be imported by MW. I (and my customer) want this to happen without human intervention. I thought there was a way to have a csv dumped into the list-import folder and MW would automatically import it. Is that possible, is there a different method, or will a human have to do this every day?
 
I thought there was a way to have a csv dumped into the list-import folder and MW would automatically import it
Name the list as [LIST_UID].csv (where [LIST_UID] is the 13 chars string unique id of a list) and place it in apps/common/runtime/list-import-queue folder (create it if missing).
Then make sure you add the cron job for list-import.
That's it, all will run automatically.

My question would be, why not using the API for such tasks ?
 
I will try that, thanks.

My question would be, why not using the API for such tasks ?

Cuz I'm not a javascript programmer & I don't have the time to frustrate myself right now. 10 minutes to cut & paste 20 lines of PHP & I'm off to other projects.
 
I'm having trouble with the CLI as well. I have the cron job set up correctly (the cron job history shows it running successfully every 5 minutes, as desired), but when I import a csv, I see it added to the list-import-queue folder, then nothing is added to the list-import folder when it's finished. Nothing is in the Application Log, either.
 
Back
Top