コード例 #1
0
def do_sync(app_index):
    """
    Get the app for the given index.
    For multiprocessing can't pass a complex object hence the call here...again
    """
    #sanity check:
    try:
        app = get_apps()[app_index]
        couchdbkit_handler.sync(app, verbosity=2, temp='tmp')
    except Exception, ex:
        print "Exception running sync, but ignoring.\n\tapp=%s\n\t%s" % (app, ex)
        return "%s-error" % app_index
コード例 #2
0
def do_sync(app_index):
    """
    Get the app for the given index.
    For multiprocessing can't pass a complex object hence the call here...again
    """
    #sanity check:
    try:
        app = get_apps()[app_index]
        couchdbkit_handler.sync(app, verbosity=2, temp='tmp')
    except Exception, ex:
        print "Exception running sync, but ignoring.\n\tapp=%s\n\t%s" % (app,
                                                                         ex)
        return "%s-error" % app_index
コード例 #3
0
ファイル: sync_couchdb.py プロジェクト: dimagi/couchdbkit
 def handle(self, *args, **options):
     for app in apps.get_apps():
         couchdbkit_handler.sync(app, verbosity=2)
コード例 #4
0
ファイル: __init__.py プロジェクト: jeremi/couchdbkit
def syncdb(app, created_models, verbosity=2, **kwargs):
    """ funtion used by syndb signal """
    from couchdbkit.ext.django.loading import couchdbkit_handler
    couchdbkit_handler.sync(app, verbosity=2)
コード例 #5
0
ファイル: __init__.py プロジェクト: mattss/couchdbkit
def syncdb(sender, **kwargs):
    """ function used by syncdb signal """
    from couchdbkit.ext.django.loading import couchdbkit_handler
    couchdbkit_handler.sync(sender)
コード例 #6
0
 def handle_noargs(self, **options):
     for app in get_apps():
         couchdbkit_handler.sync(app, verbosity=2)
コード例 #7
0
ファイル: __init__.py プロジェクト: dimagi/couchdbkit
def syncdb(app_config, verbosity=2, **kwargs):
    """ function used by syncdb signal """
    from couchdbkit.ext.django.loading import couchdbkit_handler
    couchdbkit_handler.sync(app_config, verbosity=verbosity)
コード例 #8
0
ファイル: __init__.py プロジェクト: dimagi/couchdbkit
def syncdb(app_config, verbosity=2, **kwargs):
    """ function used by syncdb signal """
    from couchdbkit.ext.django.loading import couchdbkit_handler
    couchdbkit_handler.sync(app_config, verbosity=verbosity)
コード例 #9
0
 def handle(self, *args, **options):
     for app in apps.get_apps():
         couchdbkit_handler.sync(app, verbosity=2, temp='tmp')