@xuda.io/drive_module 1.1.577 → 1.1.579

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 +22 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2203,6 +2203,27 @@ const get_folder_docs = async function (dir, drive_type, app_id) {
2203
2203
  return docs;
2204
2204
  };
2205
2205
 
2206
- const reset_deployment_cache = async function (datacenter_id) {};
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
+ };
2207
2228
 
2208
2229
  setTimeout(function () {}, 2000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.577",
3
+ "version": "1.1.579",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {