salt.returners.django_return
A returner that will inform a Django system that returns are available using Django's signal system.
https://docs.djangoproject.com/en/dev/topics/signals/
It is up to the Django developer to register necessary handlers with the signals provided by this returner and process returns as necessary.
The easiest way to use signals is to import them from this returner directly and then use a decorator to register them.
An example Django module that registers a function called 'returner_callback' with this module's 'returner' function:
import salt.returners.django_return from django.dispatch import receiver @receiver(salt.returners.django_return, sender=returner) def returner_callback(sender, ret): print('I received {0} from {1}'.format(ret, sender))
-
Do any work necessary to prepare a JID, including sending a custom ID
salt.returners.django_return.prep_jid(nocache=False, passed_jid=None)
-
Signal a Django server that a return is available
salt.returners.django_return.returner(ret)
-
Save the load to the specified jid
salt.returners.django_return.save_load(jid, load, minions=None)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/returners/all/salt.returners.django_return.html