Skip to content

Simplify custom adapter interface#86

Draft
adamzaninovich wants to merge 2 commits intoa2-rearchitecturefrom
a2-adapter-interface
Draft

Simplify custom adapter interface#86
adamzaninovich wants to merge 2 commits intoa2-rearchitecturefrom
a2-adapter-interface

Conversation

@adamzaninovich
Copy link
Copy Markdown
Member

@tielur says making adapters is too damn hard.
I agree.
Hopefully this will fix that problem.

Still rough/not yet working. I'm pushing it up to get some eyes on it.

@adamzaninovich adamzaninovich self-assigned this Sep 13, 2017
def handle_cast({:reply, msg}, bot) do
IO.puts "got reply message #{inspect msg} from bot #{inspect bot}"
{:noreply, bot}
def handle_connect(bot) do
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be handle_connected

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed my mind... this should be handle_connect
It makes more sense in the context of everything else.

@@ -1,39 +1,40 @@
defmodule Alice.Adapters.ConsoleTest do
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still todo: make these tests work.

@adamzaninovich
Copy link
Copy Markdown
Member Author

When the bot process crashes, it restarts. When it restarts, it also starts new adapter and handler processes, even though there are existing ones. Solution is probably to make sure old adapter and handlers are cleaned up when the bot crashes so that an entirely new system can be started.

@adamzaninovich adamzaninovich marked this pull request as draft April 11, 2020 18:59
@adamzaninovich adamzaninovich changed the title WIP: Simplify custom adapter interface Simplify custom adapter interface Apr 11, 2020
@tielur
Copy link
Copy Markdown
Member

tielur commented Feb 23, 2021

@adamzaninovich I'm working on review this, it's only taking me a few years :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants