Very early prototype of writing a set of plugins for nornir integrating with nhost's BaaS offering. Why? Because it provides:
And because I work there :)
Some ideas:
This plugin does the following:
success
and completed
set to False
, the name
of the task and the arguments
passed to itcompleted
to True
and success
not results.failed
Below you can see a screenshot of me attempting to write a graphql query to build a quick report to see the tasks that failed after a given time:
You will need:
Alternatively, nix
If you want to try the processor you will need to start the environment first.
Run nix develop
and then nhost
Install the nhost cli and then run nhost
You can either try to import the processor on your and try to use it yourself:
from nornir_nhost.plugins.processors import SaveToGraphql
url = "http://localhost:1337/v1/graphql"
nhost_admin_secret = "nhost-admin-secret"
processor = SaveToGraphql(url, nhost_admin_secret)
Or you can run the tests with pytest -vs
several times to at least see how the data is populated and play with the web console.
I will write a more thorough guide but the gist of it is:
url
and nhost_admin_secret
correspondingly (the web interface should tell you all that). Proper authentication with JWT will come later if there is interest in the RBAC solution.