def sync(params): try: bc_sync.record(params['table'], params['record']) except Exception, e: LOG.error(e) return jsonrpc.result_error('ServerError', { 'status': 'error', 'message': 'Unable to sync object' })
def syncList(params): try: for r in params['list']: bc_sync.record(params['table'], r) except Exception, e: LOG.error(e) return jsonrpc.result_error('ServerError', { 'status': 'error', 'message': 'Unable to sync list of objects' })