@xuda.io/drive_module 1.1.579 → 1.1.581

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +6 -23
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -51,6 +51,12 @@ const fs = require("fs");
51
51
  file_obj
52
52
  ) {
53
53
  req.drive_type = type;
54
+
55
+ if (type === "workspace") {
56
+ const deploy_module = require(`${module_path}/deploy_module`);
57
+ deploy_module.reset_deployment_cache();
58
+ }
59
+
54
60
  return await module.exports[method](req, job_id, headers, file_obj);
55
61
  };
56
62
  });
@@ -2203,27 +2209,4 @@ const get_folder_docs = async function (dir, drive_type, app_id) {
2203
2209
  return docs;
2204
2210
  };
2205
2211
 
2206
- const reset_deployment_cache = async function (datacenter_id) {
2207
- const datacenter_deployments = await db_module.get_couch_view_raw(
2208
- "xuda_master",
2209
- "datacenter_deployments",
2210
- {
2211
- key: datacenter_id,
2212
- }
2213
- );
2214
-
2215
- for (let deployment of datacenter_deployments.rows) {
2216
- if (deployment.value.app_status_code === 3) {
2217
- const ssh = await get_ssh_connection(deployment.id);
2218
- const host = `root@${deployment.value.app_hosting_server.ip}`;
2219
-
2220
- await _utils.run_ssh_script(`
2221
-
2222
- ssh ${ssh} ${host} rm /var/xuda/cache/*;
2223
-
2224
- `);
2225
- }
2226
- }
2227
- };
2228
-
2229
2212
  setTimeout(function () {}, 2000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.579",
3
+ "version": "1.1.581",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {