Jump to content

Trouble getting workflow to download to data dir


Recommended Posts

Posted (edited)

In the following workflow there are several commands that cache a local copy of data to make the workflow faster, I've just added a new command that this functionality isn't working properly for, which is strange given that the code is pretty simmilar to how the other commands that are working function.

 

Working example:

d7 hook_   (will download a file to data dir called d7.array)

 

If you install the workflow https://www.dropbox.com/s/lgg7p4gkb8cs0e5/Drupal.alfredworkflow

and then type the following (dp alfred) it should download an XML file (which is 15.2MB) and convert it into a much smaller projects.array (2.9MB) that gets saved to the data dir, this all works fine when I test it as a php script from terminal, but when I run it from Alfred I can see the network activity for the download, but the projects.array file never gets saved to disk.

 

If I copy the projects.array file that was created when running from terminal into the data folder it works fine though.

 

Any suggestions would be greatly appreciated.

Edited by BrianGilbert_
Posted

Resolved by adding the following to the dp Script Filter:

 

ini_set('max_execution_time', '300');
ini_set('memory_limit', '265M' );
ini_set('post_max_size', '30M');
ini_set('upload_max_filesize', '30M');

Posted

You have two different copies of PHP. The one in your system area is not the same that you use at the terminal. If you are going to use features not turned on or set to a different level than in the system version, you need to make sure it will work for others not using your configuration. Alfred assumes a standard config, therefore, you should make config changes in your script like you show above. You might try comparing your two installs and see what all is different. It is best to set your terminal version to the same parameters as a standard install. That way you are forced to make changes like this while experimenting in the terminal.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...