<div>Hi all,</div><div><br></div>Is using Batch API from hook_install discouraged?<div><br></div><div>On installation, my module retrieves 9 files from the Web, parses them, and enters some information into the database. I wanted to use Batch API to do this.</div>
<div><br></div><div>It is working in the Web interface, but when I try to enable my module with Drush, I get the following error</div><div><div>WD php: Warning: Cannot modify header information - headers already sent by      </div>
<div>(output started at /drush/includes/drush.inc:797) in</div><div>drupal_goto() (line 677 of /drupal-head/includes/common.inc).</div><div><br></div><div>I wanted to use Batch API because some people with slower connections might have timeout problems when retrieving the files and because it is a neat way to tell the user what is happening. </div>
<div><br></div><div>Is there another way I should be doing this?</div><div><br></div><div>Thanks,</div><div>Lin</div><br>-- <br><div>Lin Clark</div><div><a href="http://www.deri.ie/" target="_blank">DERI, NUI Galway</a></div>
<div><br></div><div><a href="http://lin-clark.com" target="_blank">lin-clark.com</a></div><div><a href="http://twitter.com/linclark" target="_blank">twitter.com/linclark</a></div><br>
</div>