Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
iplakas
ryax-module
Commits
fbaf8b9d
Commit
fbaf8b9d
authored
Jul 09, 2021
by
Ioannis Plakas
Browse files
Initial commit
parents
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
simple_source/run.py
simple_source/run.py
+16
-0
simple_source/ryax_metadata.yml
simple_source/ryax_metadata.yml
+38
-0
No files found.
simple_source/run.py
0 → 100644
View file @
fbaf8b9d
from
ryax_gateway.gateway
import
RyaxGateway
,
main
class
RunOneExecution
(
RyaxGateway
):
async
def
handler
(
self
):
text
=
self
.
inputs_values
[
"input1"
]
topic
=
self
.
inputs_values
[
"mqtt_topic"
]
mqtt_server
=
self
.
inputs_values
[
"mqtt_server"
]
await
self
.
send_execution
({
"output1"
:
text
,
"output2"
:
topic
,
"output3"
:
mqtt_server
})
if
__name__
==
"__main__"
:
main
(
RunOneExecution
)
simple_source/ryax_metadata.yml
0 → 100644
View file @
fbaf8b9d
apiVersion
:
"
ryax.tech/v1"
kind
:
Gateways
spec
:
id
:
one-run
human_name
:
Run one execution
type
:
python3
version
:
"
1.0"
detail
:
Launches a single execution of the workflow
categories
:
-
Source
-
Developer tools
-
Timer
-
Default Modules
inputs
:
-
help
:
The MQTT server to subscribe on.
human_name
:
MQTT server
name
:
mqtt_server
type
:
string
-
help
:
serv
human_name
:
MQTT server
name
:
mqtt_topic
type
:
string
outputs
:
-
help
:
The content of the MQTT message read from the topic.
human_name
:
MQTT message value
name
:
output1
type
:
string
-
help
:
The cont.
human_name
:
MQTT message value
name
:
output2
type
:
string
-
help
:
The cont.
human_name
:
MQTT message value
name
:
output3
type
:
string
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment