Called when a project is closed.

        :param project: Project instance
359678
def project_closed(self, project):
        

        yield from super().project_closed(project)
        hdd_files_to_close = yield from self._find_inaccessible_hdd_files()
        for hdd_file in hdd_files_to_close:
            log.info("Closing VirtualBox VM disk file {}".format(os.path.basename(hdd_file)))
            try:
                yield from self.execute("closemedium", ["disk", hdd_file])
            except VirtualBoxError as e:
                log.warning("Could not close VirtualBox VM disk file {}: {}".format(os.path.basename(hdd_file), e))
                continue
684321
def close(self):
        
        if not self.closed:
            self.closed = True
            yield self._framework.yieldable(self._close())
240644
void submit() {

        if (isValid()) {
            if (m_project == null) {
                createProject();
            } else {
                saveProject();
            }
            m_table.loadProjects();
            m_window.close();
        }
    }
1081676
def valid_project(self):
        """"""
        try:
            path = self.projects.get_active_project_path()
        except AttributeError:
            return

        if bool(path):
            if not self.projects.is_valid_project(path):
                if path:
                    QMessageBox.critical(
                        self,
                        _('Error'),
                        _("<b>{}</b> is no longer a valid Spyder project! "
                          "Since it is the current active project, it will "
                          "be closed automatically.").format(path))
                self.projects.close_project()
57424
def close(self):
        
        if not self._closed:
            closed = False
            event = self.event('connection_lost')
            if self.transport:
                if self._loop.get_debug():
                    self.logger.debug('Closing connection %s', self)
                if self.transport.can_write_eof():
                    try:
                        self.transport.write_eof()
                    except Exception:
                        pass
                try:
                    worker = self.close_pipeline()
                    self.transport.close()
                    closed = self._loop.create_task(
                        self._close(event.waiter(), worker)
                    )
                except Exception:
                    pass
            self._closed = closed or True
            if not closed:
                event.fire()
        return self._closed
593196
void handleClosed() {
    if (!closed) {
      closed = true;

      for (ContextualFuture<?> responseFuture : responseFutures.values()) {
        responseFuture.context.executor().execute(() -> responseFuture.completeExceptionally(new ConnectException("connection closed")));
      }
      responseFutures.clear();

      for (Listener<Connection> listener : closeListeners) {
        listener.accept(this);
      }
      timeout.cancel();
    }
  }
1318552
def project_leave(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/leave' % object_id, input_params, always_retry=always_retry, **kwargs)
967879
def close(self):
        
        if not self.is_closed():
            self._closing = True
            # Let the ConnectionActor do the actual close operations.
            # It will do the work on CloseOK
            self.sender.send_Close(
                0, 'Connection closed by application', 0, 0)
            try:
                yield from self.synchroniser.wait(spec.ConnectionCloseOK)
            except AMQPConnectionError:
                # For example if both sides want to close or the connection
                # is closed.
                pass
        else:
            if self._closing:
                log.warn("Called `close` on already closing connection...")
        # finish all pending tasks
        yield from self.protocol.heartbeat_monitor.wait_closed()
937046
def _ws_on_close(self, ws: websocket.WebSocketApp):
        
        self.connected = False
        self.logger.error('Websocket closed')
        self._reconnect_websocket()
540110
public void actionDeleteProject() throws Exception {

        String pId = getJsp().getRequest().getParameter(CmsEditProjectDialog.PARAM_PROJECTID);
        getCms().deleteProject(new CmsUUID(pId));
        refreshList();
        actionCloseDialog();
    }
141114
def drop_project(project_name):
    
    conn, c = open_data_base_connection()
    # Need to delete all the run_tables before removing the project_table and the entry from the main_table
    run_table_name = project_name + '_run_table'

    c.execute("SELECT run_name FROM {}".format(run_table_name))
    run_names = np.array(c.fetchall()).squeeze(axis=1)

    # remove one run at a time
    for run in run_names:
        drop_run(project_name, run)

    c.execute("DROP TABLE IF EXISTS {}".format(run_table_name))

    # Remove the project row from main table
    c.execute("""DELETE FROM main_table WHERE project_name='{}'""".format(project_name))
    conn.commit()
    print("{} project deleted".format(project_name))
162076
def _set_closed(self, future):
        
        logger.debug("%s[%s] closed.", self.__class__.__name__, id(self))
        self.on_closed.emit(self)
        self._closed_future.set_result(future.result())
925733
def recruitment_closed(self, match):
        
        if self.status_thread is None:
            self.status_thread = threading.Thread(target=self.check_status)
            self.status_thread.start()
1022548
def wait_closed(self):
        
        if self._closed:
            return
        if not self._closing:
            raise RuntimeError(
                ".wait_closed() should be called "
                "after .close()"
            )

        while self._free:
            conn = self._free.popleft()
            if not conn.closed:
                yield from conn.close()
            else:
                # pragma: no cover
                pass
        with (yield from self._cond):
            while self.size > self.freesize:
                yield from self._cond.wait()
        self._used.clear()
        self._closed = True
812645
def close(self):
        """"""
        self._closed = True
        if self.receive_task:
            self.receive_task.cancel()
        if self.connection:
            self.connection.close()
370475
def close(self):
        

        if self._closed:
            return False

        log.info("{module}: '{name}' [{id}]: is closing".format(module=self.manager.module_name,
                                                                name=self.name,
                                                                id=self.id))

        if self._console:
            self._manager.port_manager.release_tcp_port(self._console, self._project)
            self._console = None
        if self._wrap_console:
            self._manager.port_manager.release_tcp_port(self._internal_console_port, self._project)
            self._internal_console_port = None

        if self._aux:
            self._manager.port_manager.release_tcp_port(self._aux, self._project)
            self._aux = None

        self._closed = True
        return True
708195
def close(self):
        

        project_nodes_id = set([n.id for n in self.nodes])

        for module in self.compute():
            module_nodes_id = set([n.id for n in module.instance().nodes])
            # We close the project only for the modules using it
            if len(module_nodes_id & project_nodes_id):
                yield from module.instance().project_closing(self)

        yield from self._close_and_clean(False)

        for module in self.compute():
            module_nodes_id = set([n.id for n in module.instance().nodes])
            # We close the project only for the modules using it
            if len(module_nodes_id & project_nodes_id):
                yield from module.instance().project_closed(self)

        try:
            if os.path.exists(self.tmp_working_directory()):
                shutil.rmtree(self.tmp_working_directory())
        except OSError:
            pass