Skip to content

Commit

Permalink
Restart every hour w/ reduced cache size
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Oct 24, 2024
1 parent d0a0742 commit b413b84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/api/ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module.exports = {
{
name: 'serve',
script: 'backend/api/lib/serve.js',
// Restart every day at 2/3 AM LA time (UTC-7/8)
cron_restart: '0 10 * * *',
// Restart every hour
cron_restart: '0 * * * *',
instances: 1,
autorestart: true,
watch: false,
Expand Down
2 changes: 1 addition & 1 deletion backend/shared/src/init-caches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const initCaches = async (timeoutId: NodeJS.Timeout) => {
const activeUserIdsToCacheInterests = await pg.map(
`select distinct user_id from user_contract_interactions
where created_time > now() - interval $1`,
['1 month'],
['1 hour'],
(r) => r.user_id as string
)
clearTimeout(timeoutId)
Expand Down

0 comments on commit b413b84

Please sign in to comment.