New post

Find

Digest
· Dec 30, 2024

InterSystems Developers Publications, Week December 23 - 29, 2024, Digest

Articles
Announcements
#InterSystems IRIS
#IRIS contest
#Developer Community Official
Questions
Discussions
December 23 - 29, 2024Week at a GlanceInterSystems Developer Community
Question
· Dec 30, 2024

[Duda] Gestionar alertas cuando hay mensajes encolados y/o el tiempo de espera es excesivo

Buenos días,

Muchas gracias por leerme y sobre todo gracias por su ayuda al responder.

 

He estado indagando sobre cómo enviar alertas cuando en una Producción de Interoperabilidad, el tamaño de la cola y/o el tiempo de espera son excesivos.

 

He visto que en las Operaciones y los Procesos, existe el apartado de "Control de Alertas" en la Configuración:

 

He probado a poner "Alerta sobre el tamaño de la cola" a 1, he desactivado la operación, he reenviado 2 mensajes, he comprobado que se encolan:

Sin embargo, no veo que al "Gestor de notificaciones de alerta" de la Producción: "Ens.Alerting.NotificationManager"

Le llegue un mensaje...

¿Me podrían ayudar con esto? ¿En qué sección / log se ve lo que se envía cuando el tamaño de la cola excede a lo especificado en Control de Alertas > Alerta sobre el tamaño de la cola?

 

Gracias por su ayuda

 

He estado indagando en varios recursos previamente a preguntar:

https://community.intersystems.com/post/ensemble-business-operation-queu...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://community.intersystems.com/post/email-alert-operation

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

 

Si me pueden ayudar se los agradezco infinito.

Gracias. 🙂🙂🙂

3 Comments
Discussion (3)2
Log in or sign up to continue
Article
· Dec 30, 2024 1m read

Tarjetas de Navidad de Global Masters

🎄✨ Felicitaciones navideñas de la Comunidad ✨🎄

En Global Masters, nos habéis enviado maravillosas felicitaciones para la comunidad, ¡y estamos deseando compartirlas con todos! Hemos transformado vuestras felicitaciones en unas preciosas tarjetas navideñas: echadles un vistazo a continuación 💌. ¡Gracias a todos por vuestras cálidas palabras!

También organizamos un pequeño concurso en Global Masters para elegir la felicitación navideña más original, ¡y la tarjeta de @Harshitha.Balakrishna fue elegida la mejor! Aquí la tenéis: 👇

     📌 A continuación podéis ver todos los saludos compartidos por los miembros de Global Masters. Nos recuerdan lo importante que es formar parte de una comunidad tan unida y creativa. 

                         ¡Felices fiestas! 🎁

Discussion (0)1
Log in or sign up to continue
Article
· Dec 30, 2024 2m read

Creating a REST client to get Tracks from Spotify REST API - Part3 Get some data (e.g. Artists)

Last Chapter: Creating a REST client to get Tracks from Spotify REST API - Part2 Save and Refresh Token

Git link: https://github.com/ecelg/InterSystems-IRIS-as-a-Spotify-REST-client
 

Ok, now I am pretty sure i have a valid token for making query.😀

Shall we try to query something from the API.

Again, its time to go through the API document https://developer.spotify.com/documentation/web-api/tutorials/getting-started

Search for Request artist data

the suggested code is like the following

curl "https://api.spotify.com/v1/artists/4Z8W4fKeB5YxbusRsdQVPb" \
     -H "Authorization: Bearer  BQDBKJ5eo5jxbtpWjVOj7ryS84khybFpP_lTqzV7uV-T_m0cTfwvdn5BnBSKPxKgEb11"

Which mean that we can get the artists by the id 4Z8W4fKeB5YxbusRsdQVPb and we need to attach our token as Authorization: Bearer  {our token} at the header

 


OK let start writing the class method getdata

Open the class rest.utli.requestUtli.cls

Add the following class method 

ClassMethod getdata(apiname = "", path = "", query = "0") As %String [ Language = python ]
{
	#w ##class(rest.utli.requestUtli).getdata("Spotify","/artists/4Z8W4fKeB5YxbusRsdQVPb")
	import requests
	import json
	import iris
	
	# get the token by apiname
	token=iris.cls('rest.utli.requestUtli').getToken(apiname)
	
	# get the apiinfo object by apiname
	rowid=iris.cls('rest.class.apiinfo').checkRowid(apiname)
	a=iris.cls('rest.class.apiinfo')._OpenId(rowid)
	
	# parameter perparation
	api_baseurl=a.apiurl
	api_url=api_baseurl+path
	if query!="0":
		api_url=api_baseurl+path+"?"+query
	
	atoken=a.tokentype+" "+token
	headers={"Authorization":atoken}
	
	del a
	
	# get it
	response = requests.get(api_url,headers=headers, verify=False)
	return json.dumps(response.json())
}

Save it

 


Now open a terminal and test the code

Run the following line

w ##class(rest.utli.requestUtli).getdata("Spotify","/artists/4Z8W4fKeB5YxbusRsdQVPb")

Yeah!!! 😀 Can get the detail of the artists!!!!

Let's go to the link to check who is this artist

https://open.spotify.com/artist/4Z8W4fKeB5YxbusRsdQVPb

Sorry... I am not sure if I know him/her.... can I search for someone I know?

 

Let try another path

w ##class(rest.utli.requestUtli).getdata("Spotify","/search","offset=2&limit=2&query=Ed%20Sheeran&type=artist&market=SG")

Let's go to the link to check

https://open.spotify.com/artist/2Vvz9VlewaR5wMQPrEZhC2

ok ...🤐 seems something making sense🤨

Discussion (0)1
Log in or sign up to continue