Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 30, 2025

What

Restores AppLockService as a DI-based wrapper around the distributed lock functions, replacing direct acquireApObjectLock calls in AP services.

  • Created AppLockService.ts with getApLock() and getChartInsertLock() methods
  • Updated ApNoteService and ApInboxService to use AppLockService instead of injecting Redis directly
  • Registered service in CoreModule.ts

Before:

constructor(
  @Inject(DI.redis) private redisClient: Redis.Redis,
) {}

const unlock = await acquireApObjectLock(this.redisClient, uri);

After:

constructor(
  private appLockService: AppLockService,
) {}

const unlock = await this.appLockService.getApLock(uri);

Why

Per @syuilo's request: cleaner implementation with Redis instance managed via DI rather than passed manually to lock functions. Services needing AP object locking no longer need direct Redis injection.

Additional info (optional)

Build verified. No new security issues (CodeQL clean).

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

renovate bot and others added 30 commits May 26, 2025 22:50
- メンテナンスされないredis-lockを自前実装に変更
- 既にロックされている場合のリトライ間隔を調整
Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /home/REDACTED/.nvm/versions/node/v22.21.1/bin/node node dist/index.js --exec install (dns block)
  • iojs.org
    • Triggering command: /usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix major dependency updates Restore AppLockService to wrap acquireApObjectLock Nov 30, 2025
Copilot AI requested a review from syuilo November 30, 2025 00:44
Base automatically changed from renovate/major-backend-update-dependencies to develop November 30, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants