Package s3 :: Package sync_adapter :: Module ccrm :: Class S3SyncAdapter
[frames] | no frames]

Class S3SyncAdapter

source code

              object --+    
                       |    
s3sync.S3SyncBaseAdapter --+
                           |
                          S3SyncAdapter

CiviCRM Synchronization Adapter


Status: experimental

Instance Methods
 
register(self)
Register this site at the peer repository
source code
 
login(self)
Login at the peer repository
source code
 
pull(self, task, onconflict=None)
Fetch updates from the peer repository and import them into the local database (active pull)
source code
 
push(self, task)
Extract new updates from the local database and send them to the peer repository (active push)
source code

Inherited from s3sync.S3SyncBaseAdapter: __init__, receive, send

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  RESOURCE = {"pr_person": {"q": "civicrm/contact", "contact_typ...
Properties

Inherited from object: __class__

Method Details

register(self)

source code 

Register this site at the peer repository

Returns:
True to indicate success, otherwise False
Overrides: s3sync.S3SyncBaseAdapter.register

login(self)

source code 

Login at the peer repository

Returns:
None if successful, otherwise the error
Overrides: s3sync.S3SyncBaseAdapter.login

pull(self, task, onconflict=None)

source code 

Fetch updates from the peer repository and import them into the local database (active pull)

Parameters:
  • task - the synchronization task (sync_task Row)
  • onconflict - callback for automatic conflict resolution
Returns:
tuple (error, mtime), with error=None if successful, else error=message, and mtime=modification timestamp of the youngest record sent
Overrides: s3sync.S3SyncBaseAdapter.pull

push(self, task)

source code 

Extract new updates from the local database and send them to the peer repository (active push)

Parameters:
  • task - the synchronization task (sync_task Row)
Returns:
tuple (error, mtime), with error=None if successful, else error=message, and mtime=modification timestamp of the youngest record sent
Overrides: s3sync.S3SyncBaseAdapter.push

Class Variable Details

RESOURCE

Value:
{"pr_person": {"q": "civicrm/contact", "contact_type": "Individual"},}