The new way of workers DB synchronization

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with '=== The new way of workers DB synchronization === From client version 150701 as well as kernel version 150701, the watched files are being sent in BASE64 encoding, allowing to t…')
Line 1: Line 1:
-
=== The new way of workers DB synchronization ===
 
From client version 150701 as well as kernel version 150701, the watched files are being sent in BASE64 encoding, allowing to transfer other than UTF-8 encoded text files.
From client version 150701 as well as kernel version 150701, the watched files are being sent in BASE64 encoding, allowing to transfer other than UTF-8 encoded text files.

Revision as of 13:41, 1 July 2015

From client version 150701 as well as kernel version 150701, the watched files are being sent in BASE64 encoding, allowing to transfer other than UTF-8 encoded text files.

That means this feature can be use to watch and transfer changes in workers.txt to clients over CNP connection.

Add this to kernel config file:

watch/workers = /usr/local/plc/lib/workers.txt

Make sure workers.update on kernel does not replace workers.txt with temporary file but truncates it instead, i.e. this is wrong:

mv -f /usr/local/plc/lib/workers.txt.tmp /usr/local/plc/lib/workers.txt

and this is correct:

cat /usr/local/plc/lib/workers.txt.tmp > /usr/local/plc/lib/workers.txt
rm -f /usr/local/plc/lib/workers.txt.tmp


Don't forget to remove workers.update from cron on all stations.

Personal tools