@abtnode/core 1.16.30-beta-958ae719 → 1.16.30-beta-b7f31b10

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.
@@ -4247,8 +4247,6 @@ class DiskBlockletManager extends BaseBlockletManager {
4247
4247
  nftId: data.controller.nftId,
4248
4248
  });
4249
4249
 
4250
- // TODO: 如果绑定了 DID Space 备份到 DID Space
4251
-
4252
4250
  await this.delete({ did, keepData: false, keepConfigs: false, keepLogsDir: false });
4253
4251
  logger.info('the exceed redemption blocklet already deleted', {
4254
4252
  blockletDid: did,
@@ -28,6 +28,7 @@ const {
28
28
  USER_AVATAR_URL_PREFIX,
29
29
  ROLES,
30
30
  LAUNCH_SESSION_STATUS,
31
+ SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS,
31
32
  } = require('@abtnode/constant');
32
33
 
33
34
  const logger = require('@abtnode/logger')('@abtnode/core:util:launcher');
@@ -410,13 +411,15 @@ const getLaunchSessionStatus = async (blockletDid, controller) => {
410
411
  throw new Error(error);
411
412
  }
412
413
 
413
- logger.info('get launcher session success', { launcherSessionId, launcherSession });
414
+ logger.info('get launcher session success', { blockletDid, launcherSessionId, launcherSession });
414
415
  return launcherSession.status;
415
416
  };
416
417
 
417
418
  const isBlockletExpired = async (blockletDid, controller) => {
418
419
  const status = await getLaunchSessionStatus(blockletDid, controller);
419
- return [LAUNCH_SESSION_STATUS.expired, LAUNCH_SESSION_STATUS.terminated].includes(status);
420
+ return [LAUNCH_SESSION_STATUS.overdue, LAUNCH_SESSION_STATUS.canceled, LAUNCH_SESSION_STATUS.terminated].includes(
421
+ status
422
+ );
420
423
  };
421
424
 
422
425
  const isLaunchSessionTerminated = (session) => session.status === LAUNCH_SESSION_STATUS.terminated;
@@ -426,9 +429,8 @@ const isBlockletTerminated = async (blockletDid, controller) => {
426
429
  return status === LAUNCH_SESSION_STATUS.terminated;
427
430
  };
428
431
 
429
- const DATA_RETENTION_DAYS = 30;
430
432
  const isDataRetentionExceeded = (terminatedAt) =>
431
- !!terminatedAt && dayjs().diff(dayjs(terminatedAt), 'days') > DATA_RETENTION_DAYS;
433
+ !!terminatedAt && dayjs().diff(dayjs(terminatedAt), 'days') > SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS;
432
434
 
433
435
  module.exports = {
434
436
  consumeServerlessNFT,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.30-beta-958ae719",
6
+ "version": "1.16.30-beta-b7f31b10",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,19 +19,19 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@abtnode/analytics": "1.16.30-beta-958ae719",
23
- "@abtnode/auth": "1.16.30-beta-958ae719",
24
- "@abtnode/certificate-manager": "1.16.30-beta-958ae719",
25
- "@abtnode/constant": "1.16.30-beta-958ae719",
26
- "@abtnode/cron": "1.16.30-beta-958ae719",
27
- "@abtnode/logger": "1.16.30-beta-958ae719",
28
- "@abtnode/models": "1.16.30-beta-958ae719",
29
- "@abtnode/queue": "1.16.30-beta-958ae719",
30
- "@abtnode/rbac": "1.16.30-beta-958ae719",
31
- "@abtnode/router-provider": "1.16.30-beta-958ae719",
32
- "@abtnode/static-server": "1.16.30-beta-958ae719",
33
- "@abtnode/timemachine": "1.16.30-beta-958ae719",
34
- "@abtnode/util": "1.16.30-beta-958ae719",
22
+ "@abtnode/analytics": "1.16.30-beta-b7f31b10",
23
+ "@abtnode/auth": "1.16.30-beta-b7f31b10",
24
+ "@abtnode/certificate-manager": "1.16.30-beta-b7f31b10",
25
+ "@abtnode/constant": "1.16.30-beta-b7f31b10",
26
+ "@abtnode/cron": "1.16.30-beta-b7f31b10",
27
+ "@abtnode/logger": "1.16.30-beta-b7f31b10",
28
+ "@abtnode/models": "1.16.30-beta-b7f31b10",
29
+ "@abtnode/queue": "1.16.30-beta-b7f31b10",
30
+ "@abtnode/rbac": "1.16.30-beta-b7f31b10",
31
+ "@abtnode/router-provider": "1.16.30-beta-b7f31b10",
32
+ "@abtnode/static-server": "1.16.30-beta-b7f31b10",
33
+ "@abtnode/timemachine": "1.16.30-beta-b7f31b10",
34
+ "@abtnode/util": "1.16.30-beta-b7f31b10",
35
35
  "@arcblock/did": "1.18.128",
36
36
  "@arcblock/did-auth": "1.18.128",
37
37
  "@arcblock/did-ext": "^1.18.128",
@@ -42,12 +42,12 @@
42
42
  "@arcblock/pm2-events": "^0.0.5",
43
43
  "@arcblock/validator": "^1.18.128",
44
44
  "@arcblock/vc": "1.18.128",
45
- "@blocklet/constant": "1.16.30-beta-958ae719",
46
- "@blocklet/env": "1.16.30-beta-958ae719",
47
- "@blocklet/meta": "1.16.30-beta-958ae719",
48
- "@blocklet/resolver": "1.16.30-beta-958ae719",
49
- "@blocklet/sdk": "1.16.30-beta-958ae719",
50
- "@blocklet/store": "1.16.30-beta-958ae719",
45
+ "@blocklet/constant": "1.16.30-beta-b7f31b10",
46
+ "@blocklet/env": "1.16.30-beta-b7f31b10",
47
+ "@blocklet/meta": "1.16.30-beta-b7f31b10",
48
+ "@blocklet/resolver": "1.16.30-beta-b7f31b10",
49
+ "@blocklet/sdk": "1.16.30-beta-b7f31b10",
50
+ "@blocklet/store": "1.16.30-beta-b7f31b10",
51
51
  "@did-space/client": "^0.5.17",
52
52
  "@fidm/x509": "^1.2.1",
53
53
  "@ocap/mcrypto": "1.18.128",
@@ -103,5 +103,5 @@
103
103
  "jest": "^29.7.0",
104
104
  "unzipper": "^0.10.11"
105
105
  },
106
- "gitHead": "75590ff3be51e7fe2a070124541aebc203ed16dc"
106
+ "gitHead": "2d429b619b7b54b5603fb05761d3acd9ff674c2c"
107
107
  }