Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/o/p/OpenRelay-HEAD/apps/server_talk/views.py   OpenRelay(Download)
from server_talk.models import LocalNode, Sibling, NetworkResourceVersion
from server_talk.forms import JoinForm
from server_talk.api import RemoteCall
from server_talk.conf.settings import PORT, IPADDRESS
from server_talk.exceptions import AnnounceClientError
            try:
                entry_point = RemoteCall(
                    ip_address=form.cleaned_data['ip_address'],
                    port=form.cleaned_data['port']
                )

src/o/p/OpenRelay-HEAD/apps/server_talk/tasks.py   OpenRelay(Download)
 
from server_talk.exceptions import HeartbeatError, InventoryHashError
from server_talk.api import RemoteCall
from server_talk.models import LocalNode, Sibling, NetworkResourceVersion, ResourceHolder
from server_talk.literals import NODE_STATUS_DOWN, NODE_STATUS_UP
        try:
            lock = Lock.acquire_lock(u''.join(['heartbeat_check', oldest.uuid]), 20)
            node = RemoteCall(uuid=oldest.uuid)
            oldest.last_heartbeat = datetime.datetime.now()
            response = node.heartbeat()
            lock = Lock.acquire_lock(u''.join(['inventory_hash', oldest.uuid]), 20)
            oldest.last_inventory_hash = datetime.datetime.now()
            remote_api = RemoteCall(uuid=oldest.uuid)
            response = remote_api.inventory_hash()
            if oldest.inventory_hash != response['inventory_hash']: