Skip to content

Commit

Permalink
shared-state-async: removes sync from hotplug
Browse files Browse the repository at this point in the history
  • Loading branch information
javierajorge committed May 7, 2024
1 parent 1c6af3e commit aea9213
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ uci set shared-state.babel_links_info.scope='community'
uci set shared-state.babel_links_info.ttl='2400'
uci set shared-state.babel_links_info.update_interval='30'
uci commit shared-state

unique_append \
'*/1 * * * * ((sleep $(($RANDOM % 4)); /usr/share/shared-state/publishers/shared-state-publish_babel_links_info &> /dev/null)&)' \
/etc/crontabs/root
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
[ "x$ACTION" == "xifup" ] && ((sleep 30; /usr/share/shared-state/publishers/shared-state-publish_bat_hosts; shared-state-async sync bat-hosts)&)
[ "x$ACTION" == "xifup" ] && ((sleep 30; /usr/share/shared-state/publishers/shared-state-publish_bat_hosts)&)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
[ "x$ACTION" == "xifup" ] && ((sleep 30; /usr/share/shared-state/publishers/shared-state-publish_bat_links)&)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ uci set shared-state.bat_links_info.scope='community'
uci set shared-state.bat_links_info.ttl='2400'
uci set shared-state.bat_links_info.update_interval='30'
uci commit shared-state

unique_append \
'*/30 * * * * ((sleep $(($RANDOM % 120)); shared-state-publish_bat_links_info &> /dev/null)&)' \
/etc/crontabs/root

0 comments on commit aea9213

Please sign in to comment.