We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey guys
This is probably a dumb question, I was wondering how can I pass a parameter or a dict or whatever to an AsyncSaga? check this out
`
class CreatePropertySaga(AsyncSaga): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.steps = [ AsyncStep( name="create_property", action=self.create_property, base_task_name=create_property_message.TASK_NAME, queue=messaging.COMMANDS_QUEUE, on_success=self.create_property_on_success, on_failure=self.create_property_on_failure, ), ] def create_property(self, current_step: AsyncStep): self.send_message_to_other_service( current_step, asdict( create_property_message.Payload( street_address=self.request_data["streetAddres"], city=self.request_data["city"], state=self.request_data["state"], zip_code=self.request_data["zipCode"] ) ), ) def create_property_on_success(self, current_step: BaseStep, payload: dict): logger.info("Created the property successfully.") logger.info(f"Result = {payload}") def create_property_on_failure(self, current_step: BaseStep, payload: dict): logger.info("An error ocurred while trying to create the property.") logger.info(f"Result = {payload}")`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey guys
This is probably a dumb question, I was wondering how can I pass a parameter or a dict or whatever to an AsyncSaga? check this out
`
The text was updated successfully, but these errors were encountered: