Signed-off-by: Stephen Gran <steve@lobefin.net>
from dsa_mq.connection import Connection
from dsa_mq.config import Config
from dsa_mq.connection import Connection
from dsa_mq.config import Config
import logging
import logging.handlers
import optparse
import logging
import logging.handlers
import optparse
global last_run
last_update = int(time.time())
timestamp = last_update
global last_run
last_update = int(time.time())
timestamp = last_update
+ try:
+ message = json.loads(message)
+ except ValueError:
+ pass
if isinstance(message, dict):
timestamp = message.get('timestamp', last_update)
if isinstance(message, dict):
timestamp = message.get('timestamp', last_update)
sys.exit(0)
if __name__ == '__main__':
sys.exit(0)
if __name__ == '__main__':
+ do_replicate(json.dumps(
{'timestamp': time.time(),
{'timestamp': time.time(),
- 'message': 'startup complete'})
+ 'message': 'startup complete'}))