def sync_now(r, **attr):

    T = current.T
    auth = current.auth
    response = current.response

    rheader = attr.get("rheader", None)
    if rheader:
        rheader = rheader(r)

    output = dict(title=T("Manual Synchronization"), rheader=rheader)
    s3task = current.s3task

    sync = current.sync

    if not auth.s3_logged_in():
        auth.permission.fail()

    if r.interactive:
        if r.http in ("GET", "POST"):
            repository = r.record
            if not repository:
                r.error(404, current.ERROR.BAD_RECORD)
            form = FORM(TABLE(
                        TR(TD(T("Click 'Start' to synchronize with this repository now:"))),
                        TR(TD(INPUT(_type="submit", _value=T("Start"))))))
            if form.accepts(r.post_vars, current.session):
                task_id = s3task.async("sync_synchronize",
                                       args = [repository.id],
                                       vars = dict(user_id=auth.user.id,
                                                   manual=True))
                if task_id is False:
                    response.error = T("Could not initiate manual synchronization.")
                elif task_id is None:
                    response.flash = T("Manual synchronization completed.")
                else:
                    sync.set_status(manual=True)
                    response.flash = T("Manual synchronization started in the background.")
        else:
            r.error(405, current.ERROR.BAD_METHOD)
    else:
        r.error(415, current.ERROR.BAD_FORMAT)

    status = sync.get_status()
    if status.running:
        output.update(form=T("Synchronization currently active - refresh page to update status."))
    elif not status.manual:
        output.update(form=form)
    else:
        output.update(form=T("Manual synchronization scheduled - refresh page to update status."))

    response.view = "update.html"
    return output

# END =========================================================================
Construct the averaging operator on cell faces to cell centers.
dataset/ETHPy150Open sahana/eden/modules/s3db/sync.py/sync_now--crossover with--dataset/ETHPy150Open simpeg/simpeg/SimPEG/Mesh/TreeMesh.py/TreeMesh.aveF2CCV