Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: increase function execution time #179

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.9.1] - 2025-01-08

- Increased only the execution duration for the function that handles the update of ENS entries marked as stale.

## [3.9.0] - 2025-01-07

- Improve how the ENS address information is provided if available through the UI. The new approach considerably improves efficiency in terms of on-chain reads.
- Improved how the ENS address information is provided if available through the UI. The new approach considerably improves efficiency in terms of on-chain reads.

## [3.8.6] - 2024-12-05

Expand Down Expand Up @@ -396,7 +400,8 @@ Staking Pools

- First release

[unreleased]: https://github.com/cartesi/explorer/compare/v3.9.0...HEAD
[unreleased]: https://github.com/cartesi/explorer/compare/v3.9.1...HEAD
[3.9.1]: https://github.com/cartesi/explorer/compare/v3.9.1...v3.9.0
[3.9.0]: https://github.com/cartesi/explorer/compare/v3.9.0...v3.8.6
[3.8.6]: https://github.com/cartesi/explorer/compare/v3.8.6...v3.8.5
[3.8.5]: https://github.com/cartesi/explorer/compare/v3.8.5...v3.8.4
Expand Down
7 changes: 7 additions & 0 deletions apps/staking/src/pages/api/cron/ens-update-stale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ const cronSecret = process.env.CRON_SECRET;
const isAuthorized = (req: NextApiRequest) =>
req.headers.authorization === `Bearer ${cronSecret}`;

/**
* This function will be allowed to run for a maximum of 30 seconds.
*/
export const config = {
maxDuration: 30,
};

const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (!isAuthorized(req))
return handleResponse({ ok: false, error: 'unauthorized' }, res);
Expand Down
Loading