Exemplo n.º 1
0
def ctl_signals(request, cmd):
    """utility view to control and debug signals"""
    from rdf_io.signals import setup_signals, list_pubs, sync_signals
    if cmd == 'on':
        msg = auto_on()
    elif cmd == 'off':
        msg = "not implemented"
    elif cmd == 'list':
        msg = list_pubs()
    elif cmd == 'sync':
        msg = sync_signals()
    elif cmd == 'help':
        msg = "usage /rdf_io/ctl_signals/(on|off|list|sync|help)"
    else:
        msg = "Command %s not understood. Use /rdf_io/ctl_signals/help for valid commands" % cmd
    return HttpResponse(msg, status=200)
Exemplo n.º 2
0
def ctl_signals(request,cmd):
    """utility view to control and debug signals"""
    from rdf_io.signals import setup_signals,list_pubs,sync_signals
    if cmd == 'on':
        msg = auto_on()
    elif cmd == 'off' :
        msg = auto_off()
    elif cmd == 'list' :
        msg = list_pubs()
    elif cmd == 'sync' :
        msg = sync_signals()
    elif cmd == 'help' :
        msg = "usage /rdf_io/ctl_signals/(on|off|list|sync|help)"
    else:
        msg = "Command %s not understood. Use /rdf_io/ctl_signals/help for valid commands" % cmd
    return HttpResponse(msg, status=200)
Exemplo n.º 3
0
def auto_on():
    """turn Auto push signals on"""
    from rdf_io.signals import setup_signals, list_pubs
    signals.post_save.connect(setup_signals, sender=ObjectMapping)
    return list_pubs()
Exemplo n.º 4
0
def auto_on():
    """turn Auto push signals on"""
    from rdf_io.signals import setup_signals,list_pubs
    signals.post_save.connect(setup_signals, sender=ObjectMapping)
    return list_pubs()