Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias identifier Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ImportFrom alias ImportFrom alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Import alias Import alias Import alias ClassDef bases body Expr Str Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Num Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore ListLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Str If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Str If BoolOpOr Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore NameLoad If BoolOpOr CompareNotIn Str NameLoad CompareEq Call NameLoad SubscriptLoad NameLoad Index Str Num body Assign NameStore Dict Str ListLoad Dict Str Str Str Str For NameStore SubscriptLoad NameLoad Index Str body If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Str Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str ListLoad If Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str orelse Assign NameStore ListLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str For NameStore NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareEq NameLoad Str body Assign NameStore Dict For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Call AttributeLoad Call NameLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad orelse If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Call AttributeLoad Call NameLoad NameLoad attr Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Return BinOpMod Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd BinOpAdd AttributeLoad NameLoad attr NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad For NameStore SubscriptLoad NameLoad Index Str body If BoolOpAnd CompareIn Str NameLoad CompareEq SubscriptLoad NameLoad Index Str Str body Continue Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str AttributeLoad NameLoad attr Str NameLoad Str Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Str AugAssignAdd NameStore NameLoad AugAssignAdd NameStore Str AugAssignAdd NameStore NameLoad AugAssignAdd NameStore Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad Return BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad AttributeLoad NameLoad attr body ImportFrom alias Return Call AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpAdd BinOpAdd NameLoad Str NameLoad decorator_list NameLoad decorator_list
N/A N/A  
    AppScale TaskQueue configuration class. It deals with the configuration
    file given with an application 'queue.yaml' or 'queue.xml'.
    When a previous version was deployed, the older configuration from the database
 N/A json N/A logging N/A os N/A re N/A sys N/A urllib2 N/A xml.etree.ElementTree et N/A N/A N/A N/A sys path append N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ ../AppServer google.appengine.api queueinfo google.appengine.api datastore google.appengine.api datastore_types N/A N/A N/A N/A sys path append N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ ../lib N/A appscale_info N/A file_io N/A xmltodict TaskQueueConfig N/A N/A N/A  Contains configuration of the TaskQueue system.  N/A QUEUE_KIND __queue__ N/A RABBITMQ 0 N/A CELERY_CONCURRENCY 10 N/A DEFAULT_QUEUE_YAML 
queue:
- name: default
  rate: 5/s
 N/A DEFAULT_RATE 10000/s N/A APPSCALE_QUEUES __appscale_queues__ N/A QUEUE_INFO queueinfo N/A APP_NAME appname N/A QUEUE_INFO_DB 0 N/A QUEUE_INFO_FILE 1 N/A CELERY_CONFIG_DIR /etc/appscale/celery/configuration/ N/A CELERY_WORKER_DIR /etc/appscale/celery/workers/ N/A CELERY_STATE_DIR /opt/appscale/celery/ N/A TEMPLATE_DIR N/A N/A N/A N/A os path dirname N/A N/A N/A os path realpath __file__ /templates/ N/A HEADER_LOC N/A TEMPLATE_DIR header.py N/A TASK_LOC N/A TEMPLATE_DIR task.py N/A MAX_QUEUE_NAME_LENGTH 100 N/A QUEUE_NAME_PATTERN N/A ^[a-zA-Z0-9_]{1,%s}$ MAX_QUEUE_NAME_LENGTH N/A QUEUE_NAME_RE N/A N/A re compile QUEUE_NAME_PATTERN N/A YAML_TO_XML_TAGS_TO_CONVERT N/A bucket-size max-concurrent-request retry-parameters task-age-limit total-storage-limit user-email write-email min-backoff-seconds max-backoff-seconds max-doublings task-retry-limit max-concurrent-requests N/A TAGS_TO_IGNORE N/A #text __init__ N/A N/A self broker app_id N/A N/A N/A  Configuration constructor. 

    Args:
      broker: The broker to use.
      app_id: Application id.
     N/A N/A N/A file_io set_logging_format N/A N/A self _broker broker N/A N/A self _broker_location N/A N/A self __broker_location broker N/A N/A self _app_id app_id N/A N/A self _queue_info_db None N/A N/A self _queue_info_file None N/A N/A N/A file_io mkdir N/A self CELERY_CONFIG_DIR N/A N/A N/A file_io mkdir N/A self CELERY_WORKER_DIR N/A get_queue_file_location N/A N/A self app_id N/A N/A N/A  Gets the location of the queue.yaml or queue.xml file
        of a given application.
    Args:
      app_id: The application ID.
    Returns:
      The location of the queue.yaml or queue.xml file, and 
      an empty string if it could not be found.
     N/A queue_yaml N/A N/A N/A appscale_info get_app_path app_id queue.yaml N/A queue_xml N/A N/A N/A appscale_info get_app_path app_id /war/WEB-INF/queue.xml N/A N/A N/A file_io exists queue_yaml N/A N/A queue_yaml N/A N/A N/A N/A file_io exists queue_xml N/A N/A queue_xml N/A N/A N/A load_queues_from_file N/A N/A self app_id N/A N/A N/A  Parses the queue.yaml or queue.xml file of an application
        and loads it into the class.
   
    Args:
      app_id: The application ID.
    Returns:
      A dictionary of the queue settings.
    Raises:
      ValueError: If queue_file is unable to get loaded.
     N/A queue_file N/A N/A self get_queue_file_location app_id N/A info N/A using_default False N/A N/A N/A info N/A N/A file_io read queue_file N/A N/A N/A logging info N/A N/A Found queue file for app {0} format app_id N/A N/A N/A IOError N/A N/A N/A N/A logging info N/A N/A No queue file found for app {0}, using default queue format app_id N/A info N/A self DEFAULT_QUEUE_YAML N/A using_default True N/A queue_info N/A N/A N/A N/A queue_file endswith yaml using_default N/A N/A queue_info N/A N/A N/A N/A queueinfo LoadSingleQueue info ToDict N/A N/A N/A N/A queue_file endswith xml N/A N/A queue_info N/A N/A self parse_queue_xml info N/A N/A N/A ValueError N/A Unable to load queue information with %s queue_file N/A N/A queue_info N/A N/A N/A ValueError N/A Queue information with %s not set queue_file N/A has_default False N/A N/A N/A queue queue_info N/A N/A len N/A queue_info N/A queue 0 N/A N/A queue_info N/A queue N/A N/A rate name 5/s default N/A queue N/A queue_info N/A queue N/A N/A N/A N/A queue N/A name default N/A N/A has_default True N/A N/A has_default N/A N/A N/A N/A N/A queue_info N/A queue append N/A rate name 5/s default N/A N/A self _queue_info_file queue_info N/A N/A N/A logging info N/A N/A AppID {0} -- Loaded queue {1} format app_id queue_info N/A queue_info N/A parse_queue_xml N/A N/A self xml_string N/A N/A N/A  Turns an xml string into a dictionary tree using the 
        same format at the yaml conversion.

    Args:
      xml: A string contents in XML format.
    Returns:
      A dictionary tree of the xml.
     N/A xml_dict N/A N/A xmltodict parse xml_string N/A converted N/A queue N/A N/A N/A isinstance N/A N/A xml_dict N/A queue-entries N/A queue list N/A N/A all_queues N/A N/A xml_dict N/A queue-entries N/A queue N/A N/A all_queues N/A N/A N/A xml_dict N/A queue-entries N/A queue N/A queue all_queues N/A N/A single_queue N/A N/A N/A tag value N/A N/A queue iteritems N/A N/A N/A tag N/A self YAML_TO_XML_TAGS_TO_CONVERT N/A N/A tag N/A N/A tag replace - _ N/A N/A tag retry_parameters N/A N/A retry_dict N/A N/A retry_tag N/A queue N/A retry-parameters N/A N/A value N/A N/A queue N/A retry-parameters N/A retry_tag N/A N/A retry_tag N/A self YAML_TO_XML_TAGS_TO_CONVERT N/A N/A retry_tag N/A N/A retry_tag replace - _ N/A N/A retry_tag N/A self TAGS_TO_IGNORE N/A N/A N/A retry_dict N/A N/A str retry_tag N/A N/A N/A str value strip N/A N/A single_queue N/A retry_parameters retry_dict N/A N/A N/A tag N/A self TAGS_TO_IGNORE N/A N/A N/A single_queue N/A N/A str tag N/A N/A N/A str value strip N/A N/A N/A N/A converted N/A queue append single_queue N/A N/A N/A logging debug N/A N/A XML queue info is {0} format converted N/A converted N/A get_file_queue_info N/A N/A self N/A N/A N/A  Retrives the queues declared in the queue.yaml or queue.xml
        configuration. 
   
    Returns:
      A dictionary representing the queues for this application.
     N/A N/A self _queue_info_file N/A get_db_queue_info N/A N/A self N/A N/A N/A  Retrives the queues for this application configuration. 
   
    Returns:
      A dictionary representing the  
     N/A N/A self _queue_info_db N/A __get_queues_from_db N/A N/A self N/A N/A N/A  Retrives queue info from the database. 

    Returns:
      A dictionary representation of queues. 
     N/A queues_key N/A N/A N/A datastore Key from_path N/A self QUEUE_KIND N/A self _app_id _app N/A self APPSCALE_QUEUES N/A queues N/A N/A datastore Get queues_key N/A N/A N/A json loads N/A queues N/A N/A self QUEUE_INFO N/A load_queues_from_db N/A N/A self N/A N/A N/A  Gets the current queues stored in the datastore for 
        the current application and loads them into this class. 
 
    Returns:
      A dictionary of queues. 
     N/A N/A self _queue_info_db N/A N/A self __get_queues_from_db N/A N/A self _queue_info_db N/A save_queues_to_db N/A N/A self N/A N/A N/A  Stores file queue information into the datastore. 
     
    Raises:
      ValueError: If queue info has not been set. 
     N/A N/A N/A self _queue_info_file N/A N/A N/A ValueError Queue info must be set before saving the queues N/A json_queues N/A N/A json dumps N/A self _queue_info_file N/A entity N/A N/A datastore Entity N/A self QUEUE_KIND name N/A self _app_id _app N/A self APPSCALE_QUEUES N/A N/A N/A entity update N/A N/A self QUEUE_INFO N/A self APP_NAME N/A N/A datastore_types Blob json_queues N/A N/A datastore_types ByteString N/A self _app_id N/A N/A N/A datastore Put entity N/A create_celery_worker_scripts N/A N/A self input_type N/A N/A N/A  Creates the task worker python script. It uses
        a configuration file for setup.

    Args:
      input_type: Whether to use the config file or the 
                  database queue info. Default: config file.
    Returns: 
      The full path of the worker script.
     N/A queue_info N/A self _queue_info_file N/A N/A input_type N/A self QUEUE_INFO_DB N/A N/A queue_info N/A self _queue_info_db N/A header_template N/A N/A file_io read N/A self HEADER_LOC N/A task_template N/A N/A file_io read N/A self TASK_LOC N/A header_template N/A N/A header_template replace APP_ID N/A self _app_id N/A script N/A N/A N/A header_template replace CELERY_CONFIGURATION N/A self _app_id N/A queue N/A queue_info N/A queue N/A N/A queue_name N/A queue N/A name N/A queue_name N/A N/A queue_name replace - _ N/A N/A N/A self validate_queue_name queue_name N/A new_task N/A N/A task_template replace QUEUE_NAME N/A N/A self get_queue_function_name queue_name N/A script N/A new_task N/A worker_file N/A N/A self get_celery_worker_script_path N/A self _app_id N/A N/A N/A file_io write worker_file script N/A worker_file N/A remove_config_files N/A N/A app_id N/A N/A N/A  Removed celery worker and config files.
   
    Args:
      app_id: The application identifer.
     N/A worker_file N/A N/A TaskQueueConfig get_celery_worker_script_path app_id N/A config_file N/A N/A TaskQueueConfig get_celery_configuration_path app_id N/A N/A N/A file_io delete worker_file N/A N/A N/A file_io delete config_file N/A staticmethod get_queue_function_name N/A N/A queue_name N/A N/A N/A  Returns the function name of a queue which is not the queue name 
        for namespacing and collision reasons.

    Args:
      queue_name: The name of a queue.
    Returns:
      The string representing the function name.
     N/A queue_name N/A N/A queue_name replace - _ N/A N/A queue___%s queue_name N/A staticmethod get_celery_annotation_name N/A N/A app_id queue_name N/A N/A N/A  Returns the annotation name for a celery configuration of 
        a queue for a given application id.
    
    Args:
      app_id: The application ID.
      queue_name: The application queue name.
    Returns:
      A string for the annotation tag.
     N/A module_name N/A N/A TaskQueueConfig get_celery_worker_module_name app_id N/A function_name N/A N/A TaskQueueConfig get_queue_function_name queue_name N/A N/A %s.%s N/A module_name function_name N/A staticmethod get_celery_worker_script_path N/A N/A app_id N/A N/A N/A  Returns the full path of the worker script used for celery.
   
    Args:
      app_id: The application identifier.
    Returns:
      A string of the full file name of the worker script.
     N/A N/A N/A N/A N/A TaskQueueConfig CELERY_WORKER_DIR app___ app_id .py N/A staticmethod get_celery_worker_module_name N/A N/A app_id N/A N/A N/A  Returns the python module name of the queue worker script.
   
    Args:
      app_id: The application identifier.
    Returns:
      A string of the module name.
     N/A N/A app___ app_id N/A staticmethod get_celery_configuration_path N/A N/A app_id N/A N/A N/A  Returns the full path of the configuration used for celery.
   
    Args:
      app_id: The application identifier.
    Returns:
      A string of the full file name of the configuration file.
     N/A N/A N/A N/A TaskQueueConfig CELERY_CONFIG_DIR app_id .py N/A staticmethod create_celery_file N/A N/A self input_type N/A N/A N/A  Creates the Celery configuration file describing 
        queues and exchanges for an application. Uses either
        the queue.yaml/queue.xml input or what was stored in the 
        datastore to create the celery file. 

    Args:
      input_type: Whether to use the config file or the 
                  database queue info. Default: config file.
    Returns:
      A string representing the full path location of the 
      configuration file.
     N/A queue_info N/A self _queue_info_file N/A N/A input_type N/A self QUEUE_INFO_DB N/A N/A queue_info N/A self _queue_info_db N/A celery_queues N/A N/A celery_annotations N/A N/A queue N/A queue_info N/A queue N/A N/A N/A N/A mode queue N/A N/A queue N/A mode pull N/A N/A N/A celery_queue_name N/A N/A TaskQueueConfig get_celery_queue_name N/A self _app_id N/A queue N/A name N/A N/A N/A celery_queues append N/A N/A N/A N/A N/A N/A Queue(' celery_queue_name ', Exchange(' N/A self _app_id '), routing_key=' celery_queue_name '), N/A rate_limit N/A self DEFAULT_RATE N/A N/A rate queue N/A N/A rate_limit N/A queue N/A rate N/A annotation_name N/A N/A TaskQueueConfig get_celery_annotation_name N/A self _app_id N/A queue N/A name N/A N/A N/A celery_annotations append N/A N/A N/A N/A ' annotation_name ': {'rate_limit': ' rate_limit '}, N/A celery_queues N/A N/A join celery_queues N/A celery_annotations N/A N/A join celery_annotations N/A config 
from kombu import Exchange
from kombu import Queue
CELERY_QUEUES = (
 N/A config celery_queues N/A config 
)
CELERY_ANNOTATIONS = {
 N/A config celery_annotations N/A config 
}
# Everytime a task is enqueued a temporary queue is created to store
# results into rabbitmq. This can be bad in a high enqueue environment
# We use the following to make sure these temp queues are not created. 
# See http://stackoverflow.com/questions/7144025/temporary-queue-made-in-celery
# for more information on this issue.
CELERY_IGNORE_RESULT = True
CELERY_STORE_ERRORS_EVEN_IF_IGNORED = False

# One month expiration date because a task can be deferred that long.
CELERY_AMQP_TASK_RESULT_EXPIRES = 2678400

# Disable prefetching for celery workers. If tasks are small in duration this
# should be set to a higher value (64-128) for increased performance.
# See: http://celery.readthedocs.org/en/latest/userguide/optimizing.html#worker-settings
CELERYD_PREFETCH_MULTIPLIER = 1
 N/A config_file N/A N/A self _app_id .py N/A N/A N/A file_io write N/A N/A self CELERY_CONFIG_DIR config_file config N/A N/A N/A self CELERY_CONFIG_DIR config_file N/A __broker_location N/A N/A self broker N/A N/A N/A  Gets the broker location connection string.
    
    Args:
      broker: The broker enum value.
    Returns:
      A broker connection string.
    Raises:
      NotImplementedError: If the broker is not implemented
     N/A N/A broker N/A self RABBITMQ N/A brokers rabbitmq N/A N/A N/A rabbitmq get_connection_string N/A N/A N/A NotImplementedError N/A The given broker of code %d is not implemented broker N/A get_broker_string N/A N/A self N/A N/A N/A  Gets the broker connection string.

    Returns:
      A string which tells of the location of the configured broker.
     N/A N/A self _broker_location N/A validate_queue_name N/A N/A self queue_name N/A N/A N/A  Validates the queue name to make sure it can be used as a function name.
    
    Args:
      queue_name: A string representing a queue name.
    Raises:
      NameError if the name is invalid.
     N/A N/A N/A N/A N/A self QUEUE_NAME_RE match queue_name N/A N/A N/A NameError N/A Queue name %s did not match the regex %s N/A queue_name N/A self QUEUE_NAME_PATTERN N/A get_celery_queue_name N/A N/A app_id queue_name N/A N/A N/A  Gets a usable queue name for celery to prevent
        collisions where mulitple apps have the same name 
        for a queue.
    
    Args:
      app_id: The application ID.
      queue_name: String name of the queue.
    Returns:
      A string to reference the queue name in celery.
     N/A N/A N/A app_id ___ queue_name N/A staticmethod N/A