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

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

src/d/j/django-server-manager-0.1.0/server_manager/backends/mod_wsgi.py   django-server-manager(Download)
    def restart(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath:
            try:
                os.utime(filepath, None)
    def get_uptime(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath:
            try:
                return datetime.fromtimestamp(os.stat(filepath)[-2])
    def can_restart(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath and os.path.exists(filepath):
            return True
        return False

src/d/j/django-server-manager-HEAD/server_manager/backends/mod_wsgi.py   django-server-manager(Download)
    def restart(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath:
            try:
                os.utime(filepath, None)
    def get_uptime(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath:
            try:
                return datetime.fromtimestamp(os.stat(filepath)[-2])
    def can_restart(self, site_id, request):
        filepath = MOD_WSGI_FILES.get(site_id)
        if filepath and os.path.exists(filepath):
            return True
        return False