Skip to content

Commit

Permalink
[kafka] fix missing annotations in kafka worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak committed Nov 10, 2023
1 parent 9d67c1c commit be9b63d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions misc/python/kafka/frinx_worker/kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class ExecutionProperties(TaskExecutionProperties):
transform_string_to_json_valid: bool = True

class WorkerDefinition(TaskDefinition):
name = 'Kafka_publish'
description = 'Publish message to kafka broker'
labels = ['KAFKA']
timeout_seconds = 60
response_timeout_seconds = 60
name: str = 'Kafka_publish'
description: str = 'Publish message to kafka broker'
labels: list[str] = ['KAFKA']
timeout_seconds: int = 60
response_timeout_seconds: int = 60

class WorkerInput(TaskInput):
bootstrap_servers: str
Expand Down
20 changes: 10 additions & 10 deletions misc/python/kafka/frinx_worker/kafka/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,49 @@


class KafkaProducer(WorkflowImpl):
name = 'Kafka_producer'
version = 1
description = 'Simple Kafka producer'
labels = ['KAFKA']
name: str = 'Kafka_producer'
version: int = 1
description: str = 'Simple Kafka producer'
labels: list[str] = ['KAFKA']

class WorkflowInput(WorkflowImpl.WorkflowInput):
servers = WorkflowInputField(
servers: WorkflowInputField = WorkflowInputField(
name='servers',
frontend_default_value='kafka:9092',
description='Kafka bootstrap servers. Separated with coma',
type=FrontendWFInputFieldType.STRING,
)

security = WorkflowInputField(
security: WorkflowInputField = WorkflowInputField(
name='security',
frontend_default_value='SSL',
description='Request url',
type=FrontendWFInputFieldType.SELECT,
options=[str(status) for status in SecurityProtocolType]
)

message = WorkflowInputField(
message: WorkflowInputField = WorkflowInputField(
name='message',
frontend_default_value='hello telemetry &^%#$#!',
description='Request url',
type=FrontendWFInputFieldType.TEXTAREA,
)

key = WorkflowInputField(
key: WorkflowInputField = WorkflowInputField(
name='key',
frontend_default_value='telemetry_key',
description='Request url',
type=FrontendWFInputFieldType.TEXTAREA,
)

topic = WorkflowInputField(
topic: WorkflowInputField = WorkflowInputField(
name='topic',
frontend_default_value='telemetry',
description='kafka topic',
type=FrontendWFInputFieldType.STRING,
)

ssl_conf = WorkflowInputField(
ssl_conf: WorkflowInputField = WorkflowInputField(
name='ssl_conf',
frontend_default_value="""{
"ssl_check_hostname": true,
Expand Down
2 changes: 1 addition & 1 deletion misc/python/kafka/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages = [{ include = "frinx_worker" }]
name = "frinx-kafka-worker"
description = "Conductor Kafka worker for Frinx Machine"
authors = ["Jozef Volak <[email protected]>"]
version = "1.0.0"
version = "1.0.1"
readme = ["README.md", "CHANGELOG.md"]
keywords = ["frinx-machine", "kafka", "worker"]
license = "Apache 2.0"
Expand Down

0 comments on commit be9b63d

Please sign in to comment.