Drupal 7 Batch Question
The array keys available in $context are listed in Batch operations:


  
  The following keys are provided:
  
  'results' (read/write): The array of results gathered so far by the batch processing, for the current operation to append its own.
  'message' (write): A text message displayed in the progress page.
  
  The following keys allow for multi-step operations:
  
  'sandbox' (read/write): An array that can be freely used to store persistent data between iterations. It is recommended to use this instead of $_SESSION, which is unsafe if the user continues browsing in a separate window while the batch is processing.
  'finished' (write): A float number between 0 and 1 informing the processing engine of the completion level for the operation.
  1 (or no value explicitly set) means the operation is finished and the batch processing can continue to the next operation.