'Submit a request to xqueue.
header: JSON-serialized dict in the format described in \'xqueue_interface.make_xheader\'
body: Serialized data for the receipient behind the queueing service. The operation of
xqueue is agnostic to the contents of \'body\'
files_to_upload: List of file objects to be uploaded to xqueue along with queue request
Returns (error_code, msg) where error_code != 0 indicates an error'

def send_to_queue(self, header, body, files_to_upload=None):

    header_info = json.loads(header)
    queue_name = header_info.get('queue_name', u'')
    dog_stats_api.increment(XQUEUE_METRIC_NAME, tags=[u'action:send_to_queue', u'queue:{}'.format(queue_name)])
    (error, msg) = self._send_to_queue(header, body, files_to_upload)
    if (error and (msg == 'login_required')):
        (error, content) = self._login()
        if (error != 0):
            log.debug('Failed    to    login    to    queue:    %s', content)
            return (error, content)
        if (files_to_upload is not None):
            for f in files_to_upload:
                f.seek(0)
        (error, msg) = self._send_to_queue(header, body, files_to_upload)
    return (error, msg)
