ArjunSohur
ArjunSohur
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
@sodic So it turns out I didn't rtfm carefully enough... There was really never any problem, I just didn't understand how cron worked đŸ¥²
27 replies
WWasp-lang
Created by josh on 9/18/2024 in #đŸ™‹questions
What's the best way to make live updates to the deployed prisma database?
Alternatively, you could alter it through your db's terminal if db studio is giving you trouble. If you're using postgresql, I can help you there, but wasp db studio is your easiest option
10 replies
WWasp-lang
Created by josh on 9/18/2024 in #đŸ™‹questions
What's the best way to make live updates to the deployed prisma database?
Then I think
wasp db studio
wasp db studio
going to your User table, than manually changing your credits is your best bet
10 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
So in general, I'm having trouble running the job rather than declaring the job
27 replies
WWasp-lang
Created by josh on 9/18/2024 in #đŸ™‹questions
What's the best way to make live updates to the deployed prisma database?
Hey, not a dev, but I might be able to help. What do you mean by "update my admin user"?
10 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
Yeah, sorry Kapa, that didn't work, wasp will complain if I don't pass anything into submit.
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
Ok, I've messed around a little and gotten a new error. This time, I'm not being over zealous and I'm just seeing if I can get a job of sorts running. In sendNewsletters.ts (premade file):
import {type MakeNewsletter } from 'wasp/server/jobs';

export const makeNewsLetters: MakeNewsletter<never, void> = async (args: any, context: any) => {
console.log("Job executed")
}
import {type MakeNewsletter } from 'wasp/server/jobs';

export const makeNewsLetters: MakeNewsletter<never, void> = async (args: any, context: any) => {
console.log("Job executed")
}
In main.wasp:
job makeNewsletter {
executor: PgBoss,
perform: {
fn: import { makeNewsLetters } from "@src/newsletter/sendNewsletter"
},
schedule: {
cron: "1 * * * *"
},
entities: [User, Topic, Blurbs, Preferences, NewsArticles, Newsletter]
}
job makeNewsletter {
executor: PgBoss,
perform: {
fn: import { makeNewsLetters } from "@src/newsletter/sendNewsletter"
},
schedule: {
cron: "1 * * * *"
},
entities: [User, Topic, Blurbs, Preferences, NewsArticles, Newsletter]
}
This complies, but when I add
const submittedJob = await makeNewsletter.submit({})
const submittedJob = await makeNewsletter.submit({})
in actions.ts, I get no error message, but the wasp docker container crashes: wasp-server-1 exited with code 13 @kapa.ai Maybe you can help here?
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
That's a good catch, but unfortunately it didn't fix it. Here's the error again, if it's any help:
wasp-server-1 | Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/.wasp/out/sdk/wasp/dist/ext-src/payment/plans' imported from /app/.wasp/out/sdk/wasp/dist/ext-src/payment/operations.js
wasp-server-1 | at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
...
wasp-server-1 | code: 'ERR_MODULE_NOT_FOUND'
wasp-server-1 | }
wasp-server-1 | Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/.wasp/out/sdk/wasp/dist/ext-src/payment/plans' imported from /app/.wasp/out/sdk/wasp/dist/ext-src/payment/operations.js
wasp-server-1 | at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
...
wasp-server-1 | code: 'ERR_MODULE_NOT_FOUND'
wasp-server-1 | }
I'm going to try resetting and doing it over again, though I've already done that.
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
Yes, it's a .ts
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
yikes
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
@kapa.ai Since this is in .wasp, I have no control over the actual code itself since it rebuilds itself every time. And I've also tried wasp clean.
27 replies
WWasp-lang
Created by ArjunSohur on 9/17/2024 in #đŸ™‹questions
Trouble setting up a cron job
@kapa.ai It's an odd error because this is the file that it's yelling at me about:
// PUBLIC API
export * from './actions'
// MOSTLY PUBLIC API (see the file for details)
export * from './queries'

export {
// PUBLIC API
useAction,
// PUBLIC API
useQuery,
// PUBLIC API
type OptimisticUpdateDefinition,
} from './hooks'

export {
// PUBLIC API
configureQueryClient,
// PRIVATE API (framework code)
initializeQueryClient,
// PRIVATE API (framework code)
queryClientInitialized
} from './queryClient'
// PUBLIC API
export * from './actions'
// MOSTLY PUBLIC API (see the file for details)
export * from './queries'

export {
// PUBLIC API
useAction,
// PUBLIC API
useQuery,
// PUBLIC API
type OptimisticUpdateDefinition,
} from './hooks'

export {
// PUBLIC API
configureQueryClient,
// PRIVATE API (framework code)
initializeQueryClient,
// PRIVATE API (framework code)
queryClientInitialized
} from './queryClient'
Which I can't detect any errors in. It's also odd that only when I put a job in wasp.main and make the workers/bar.ts does it complain.
27 replies
WWasp-lang
Created by ArjunSohur on 9/9/2024 in #đŸ™‹questions
Cannot find module 'wasp/client/operations' or its corresponding type declarations.
No problem!
10 replies
WWasp-lang
Created by ArjunSohur on 9/9/2024 in #đŸ™‹questions
Cannot find module 'wasp/client/operations' or its corresponding type declarations.
iirc, it happened when I did npm install lucide-react
10 replies
WWasp-lang
Created by ArjunSohur on 9/9/2024 in #đŸ™‹questions
Cannot find module 'wasp/client/operations' or its corresponding type declarations.
Cool, thanks. I was stressing for a second
10 replies
WWasp-lang
Created by ArjunSohur on 8/30/2024 in #đŸ™‹questions
Deploying Wasp/fastapi on Digital Ocean
Thanks, that's super helpful!
11 replies
WWasp-lang
Created by ArjunSohur on 8/30/2024 in #đŸ™‹questions
Deploying Wasp/fastapi on Digital Ocean
Thanks @kapa.ai , I can put the fastapi and wasp on the same DO droplet, right? Doing so might actually be neccesary for talking to each other now that I think about it...
11 replies
WWasp-lang
Created by ArjunSohur on 7/21/2024 in #đŸ™‹questions
Module '"wasp/server/operations"' has no exported member 'scrapeArticles'.
If I keep noticing this trend, I'll let you know
12 replies
WWasp-lang
Created by ArjunSohur on 7/21/2024 in #đŸ™‹questions
Module '"wasp/server/operations"' has no exported member 'scrapeArticles'.
I've run into a similar error other times, i.e. an operation not getting recognized in 'wasp/client/operations', and it's usually been solved by doing wasp start, so yeah, though I didn't know it at the time, I think that's what actually solved it.
12 replies