parameters: (payload, method="PUT")
docstring: Publish message to remote data store.
docstring_summary: Publish message to remote data store.
docstring_tokens: Publish message to remote data store .
function: def store_message(payload, method="PUT"):
  
      """
      Publish message to remote data store.
      """
  
      if not DATA_STORE_CONFIG:
          return
  
      server = DATA_STORE_CONFIG.server
      auth_token = DATA_STORE_CONFIG.auth_token
  
      headers = {
          "X-Auth-Token": auth_token
      }
  
      def perform_request():
  
          """
          Perform HTTP request.
          """
  
          if method == "GET":
              response = get_http(
                  server,
                  headers=headers,
                  json=payload
              )
          else:
              response = put_http(
                  server,
                  headers=headers,
                  json=payload
              )
          response.raise_for_status()
  
          print("saved to data store")
  
      SCHEDULER.add_job(perform_request)
function_tokens: def store_message ( payload , method = "PUT" ) : if not DATA_STORE_CONFIG : return server = DATA_STORE_CONFIG . server auth_token = DATA_STORE_CONFIG . auth_token headers = { "X-Auth-Token" : auth_token } def perform_request ( ) : """
          Perform HTTP request.
          """ if method == "GET" : response = get_http ( server , headers = headers , json = payload ) else : response = put_http ( server , headers = headers , json = payload ) response . raise_for_status ( ) print ( "saved to data store" ) SCHEDULER . add_job ( perform_request )