Skip to content
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

Send msg containing Full Content alongside Diff for database storage #42

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/settings.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ttl": 21600000
},
"update": {
"throttle": 15000
"throttle": 5000
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using 1 second trottle and see how it goes.

This would provide a better user experience.

Copy link
Member

Choose a reason for hiding this comment

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

@prlanzarin - what do you think?

}
},
"express": {
Expand Down
2 changes: 1 addition & 1 deletion lib/redis/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const onPadUpdate = (meetingId, groupId, padId, rev) => {
database[meetingId].groups[groupId].pads[padId].html = html;
logger.info(ids.PAD, 'content', { meetingId, groupId, padId, rev, ...change });

sender.send('padContent', meetingId, { groupId, padId, rev, ...change });
sender.send('padContent', meetingId, { groupId, padId, rev, html, ...change });
}
}).catch(() => logger.error(ids.PAD, 'content', { meetingId, groupId, padId, rev }));
}
Expand Down
20 changes: 20 additions & 0 deletions run-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"

cp config/settings.json.template config/settings.json
sed -i "s/ETHERPAD_API_KEY/\"$(cat /usr/share/etherpad-lite/APIKEY.txt)\"/" config/settings.json

for var in "$@"
do
if [[ $var == --reset ]] ; then
echo "Performing a full reset..."
rm -rf node_modules
fi
done

if [ ! -d ./node_modules ] ; then
npm install
fi

sudo systemctl stop bbb-pads
npm start