Skip to content
Draft
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
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: 🥟 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.8"
bun-version: '1.3.8'

- name: 📥 Download deps
run: bun install --frozen-lockfile
Expand All @@ -56,7 +56,7 @@ jobs:
- name: 🥟 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.8"
bun-version: '1.3.8'

- name: 📥 Download deps
run: bun install --frozen-lockfile
Expand All @@ -82,7 +82,7 @@ jobs:
- name: 🥟 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.8"
bun-version: '1.3.8'

- name: 📥 Download deps
run: bun install --frozen-lockfile
Expand All @@ -108,7 +108,7 @@ jobs:
- name: 🥟 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.8"
bun-version: '1.3.8'

- name: 📥 Download deps
run: bun install --frozen-lockfile
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: 🥟 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.3.8"
bun-version: '1.3.8'

- name: 📥 Download deps
run: bun install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion app/utils/cron-runner.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import {
clearIntervalAsync,
setIntervalAsync,
} from 'set-interval-async/dynamic'
import { getScheduleWindow } from './cron.server.ts'
import { prisma } from './db.server.ts'
import { getrecipientsforcron } from './prisma-generated.server/sql.ts'
import {
NEXT_SCHEDULE_SENTINEL_DATE,
PREV_SCHEDULE_SENTINEL_DATE,
} from './schedule-constants.server.ts'
import { sendText, sendTextToRecipient } from './text.server.ts'
import { getScheduleWindow } from './cron.server.ts'

const cronIntervalRef = remember<{
current: ReturnType<typeof setIntervalAsync> | null
Expand Down
2 changes: 1 addition & 1 deletion app/utils/cron.server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import '#tests/setup/setup-test-env.ts'
import { faker } from '@faker-js/faker'
import { expect, test } from 'bun:test'
import { createMessage, createRecipient, createUser } from '#tests/db-utils.ts'
import { getScheduleWindow } from './cron.server.ts'
import { sendNextTexts } from './cron-runner.server.ts'
import { getScheduleWindow } from './cron.server.ts'
import { prisma } from './db.server.ts'

test('does not send any texts if there are none to be sent', async () => {
Expand Down
18 changes: 18 additions & 0 deletions environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"LITEFS_DIR": "/litefs/data",
"DATABASE_PATH": "./prisma/sqlite.db",
"DATABASE_URL": "file:./prisma/sqlite.db",
"CACHE_DATABASE_PATH": "./other/cache.db",
"SESSION_SECRET": "super-duper-s3cret",
"HONEYPOT_SECRET": "super-duper-s3cret",
"SENTRY_DSN": "your-dsn",
"INTERNAL_COMMAND_TOKEN": "some-made-up-token",
"ALLOW_INDEXING": "true",
"TWILIO_TOKEN": "your_twilio_token",
"TWILIO_SID": "your_twilio_sid",
"STRIPE_SECRET_KEY": "your_stripe_secret_key",
"STRIPE_BASIC_PAYMENT_LINK": "https://buy.stripe.com/some_id",
"STRIPE_BASIC_PRODUCT": "prod_some_id",
"STRIPE_PREMIUM_PAYMENT_LINK": "https://buy.stripe.com/some_id",
"STRIPE_PREMIUM_PRODUCT": "prod_some_id"
}
Loading