
services
********


boto.services
=============


boto.services.bs
================

class class boto.services.bs.BS

   Commands = {'reset': 'Clear input queue and output bucket', 'status': 'Report on the status of the service buckets and queues', 'batches': 'List all batches stored in current output_domain', 'retrieve': 'Retrieve output generated by a batch', 'submit': 'Submit local files to the service', 'start': 'Start the service'}

   Usage = 'usage: %prog [options] config_file command'

   do_batches()

   do_reset()

   do_retrieve()

   do_start()

   do_status()

   do_submit()

   main()

   print_command_help()


boto.services.message
=====================

class class boto.services.message.ServiceMessage(queue=None, body=None, xml_attrs=None)

   for_key(key, params=None, bucket_name=None)


boto.services.result
====================

class class boto.services.result.ResultProcessor(batch_name, sd, mimetype_files=None)

   LogFileName = 'log.csv'

   calculate_stats(msg)

   get_results(path, get_file=True, delete_msg=True)

   get_results_from_bucket(path)

   get_results_from_domain(path, get_file=True)

   get_results_from_queue(path, get_file=True, delete_msg=True)

   log_message(msg, path)

   process_record(record, path, get_file=True)


boto.services.service
=====================

class class boto.services.service.Service(config_file=None, mimetype_files=None)

   ProcessingTime = 60

   cleanup()

   delete_message(message)

   get_file(message)

   main(notify=False)

   process_file(in_file_name, msg)

   put_file(bucket_name, file_path, key_name=None)

   read_message()

   save_results(results, input_message, output_message)

   shutdown()

   split_key(key)

   write_message(message)


boto.services.servicedef
========================

class class boto.services.servicedef.ServiceDef(config_file, aws_access_key_id=None, aws_secret_access_key=None)

   get(name, default=None)

   get_obj(name)

      Returns the AWS object associated with a given option.

      The heuristics used are a bit lame.  If the option name contains
      the word 'bucket' it is assumed to be an S3 bucket, if the name
      contains the word 'queue' it is assumed to be an SQS queue and
      if it contains the word 'domain' it is assumed to be a SimpleDB
      domain.  If the option name specified does not exist in the
      config file or if the AWS object cannot be retrieved this
      returns None.

   getbool(option, default=False)

   getint(option, default=0)

   has_option(option)


boto.services.sonofmmm
======================

class class boto.services.sonofmmm.SonOfMMM(config_file=None)

   process_file(in_file_name, msg)

   queue_files()

   shutdown()


boto.services.submit
====================

class class boto.services.submit.Submitter(sd)

   get_key_name(fullpath, prefix)

   submit_file(path, metadata=None, cb=None, num_cb=0, prefix='/')

   submit_path(path, tags=None, ignore_dirs=None, cb=None, num_cb=0, status=False, prefix='/')

   write_message(key, metadata)
