New issue
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
Add distributed voucher system to libremesh #499
Conversation
|
||
local outputLines = '' | ||
|
||
function macs2string(macs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you considered table.concat
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
packages/shared-state-pirania/files/etc/shared-state/hooks/pirania/generate_vouchers
Outdated
Show resolved
Hide resolved
packages/shared-state-pirania/files/etc/shared-state/publishers/shared-state-publish_vouchers
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks ok
return result | ||
end | ||
|
||
function macs2string(macs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that this whole function could be substituted by table.concat, It's me or the function is still there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 3fd69c9
result[voucher.voucher] = voucher | ||
end | ||
|
||
io.popen("shared-state insert pirania", "w"):write(JSON.stringify(result)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line at the end of the file please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 9c23f93
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
/etc/shared-state/publishers/shared-state-publish_vouchers | |||
shared-state sync pirania |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line at the end of the file is missin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 9c23f93
hehehe... i did the proper review... but good that u r around to catch the things you mentioned. |
I check if the PR possibly breaks other stuff, if not and the package doesn't concern "core" functions of LiMe I'm approving it |
Me and Luandro have been working in Pirania and have built this plugin for shared-state that allows vouchers db to be shared between nodes.