Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/d/r/droned-HEAD/droned/lib/droned/models/server.py   droned(Download)
        }
        #self register this server hostname
        if not Server.exists(config.HOSTNAME):
            server = Server(config.HOSTNAME)
            server.listed = True
        else:
            server = Server(config.HOSTNAME)

src/d/r/droned-HEAD/droned/lib/droned/models/droneserver.py   droned(Download)
  def __init__(self, server):
    self.server = server
    self.port = config.DRONED_PORT
    #if this is a remote server use the blaster protocol
    if self.server.hostname != config.HOSTNAME:

src/d/r/droned-HEAD/droned/lib/droned/events/jabber.py   droned(Download)
    #be vain assume all conversations revolve around ourself
    context = {
        'server': Server(config.HOSTNAME),
        'subject': Server(config.HOSTNAME),
    }

src/d/r/droned-HEAD/droned/lib/droned/applications/__init__.py   droned(Download)
        def safe_process(pid):
            try: #because processes can be invalid
                return AppProcess(Server(config.HOSTNAME), pid)
            except:
                err('problem')
        """
        label = str(label)
        return AppInstance(Server(config.HOSTNAME), App(self.name), label)
 
    def delInstance(self, label):
        """
        label = str(label)
        if AppInstance.exists(Server(config.HOSTNAME), App(self.name), label):
            return AppInstance(Server(config.HOSTNAME), App(self.name), label)
        raise AssertionError('no such application instance')

src/d/r/droned-HEAD/droned/services/jabber.py   droned(Download)
    #this should be overrode in romeo
    SERVICECONFIG = dictwrapper({
        'JABBER_CHAT_NICK': config.HOSTNAME,
        'JABBER_USERNAME': 'droned',
        'JABBER_PASSWORD': 'secret',
        'JABBER_SERVER': 'jabber.example.net',
        'JABBER_CHAT_SERVICE': 'conference.jabber.example.net',
        'JABBER_PORT': 5222,
        'JABBER_RESOURCE': config.HOSTNAME,

src/d/r/droned-HEAD/droned/lib/droned/models/app.py   droned(Download)
#    serializable = True
    localInstall = property(lambda s: bool(s.server.hostname == \
            config.HOSTNAME))
 
    pid = property(lambda s: s._pid)
                raise #re-raise do avoid ending up in a pickle, literally
        except InvalidProcess:
            if config.HOSTNAME == self.server.hostname:
                AppProcess.delete(self) #make sure we are invalid
                raise InvalidProcess("Invalid PID (%s)" % pid)
            self._process = IKittProcess(self)
        elif self._process.pid != self.pid or not self._process.running:
            if config.HOSTNAME == self.server.hostname:
                AppProcess.delete(self) #take ourself out of serialization loop
                self._process = IKittNullProcess(self) #continue to work for any other refs
            AppInstance.objects if ai.app is self) )
    localappinstances = property( lambda self: (i for i in self.appinstances \
            if i.server.hostname == config.HOSTNAME) )
    runningInstances = property( lambda self: (i for i in self.appinstances \
            if i.running) )
    localrunningInstances = property( lambda self: (i for i in \
            self.runningInstances if i.server.hostname == config.HOSTNAME) )

src/d/r/droned-HEAD/droned/lib/droned/responders/core.py   droned(Download)
 
    if not regex:
        doc_url = "http://%s:%d/doc/index.html" % (config.HOSTNAME, config.DRONED_PORT)
        conversation.say("For more information read my online documentation at %s" % doc_url)
 

src/r/e/reductio-0.2.1/reductio/tasks.py   reductio(Download)
def put_in_directory(source_path, target_path):
    target_path = str(run('echo %s' % target_path))
    source_path = os.path.expanduser(source_path)
    run('mkdir -p '+os.path.dirname(target_path))
    if env.host != config.HOSTNAME or source_path != target_path:

src/d/r/droned-HEAD/droned/services/application.py   droned(Download)
   def _first_scan(self):
       for pid in listProcesses():
           try: AppProcess(Server(config.HOSTNAME), pid)
           except InvalidProcess: pass
 
   def _scan(self):
       for pid in listProcesses():
           try: AppProcess(Server(config.HOSTNAME), pid)
           except InvalidProcess: pass
           except IOError: pass #happens on linux when a pid dies

src/d/r/droned-HEAD/droned/lib/droned/models/systemstats.py   droned(Download)
        '''
        datapoint.variables.append("hostname")
        datapoint.meta_data['hostname'] = config.HOSTNAME
        datapoint.variables.append("stat")
        datapoint.meta_data['stat'] = self

  1 | 2  Next