advaith
04/07/2023, 7:38 PMadvaith
04/07/2023, 7:38 PMmsutkowski
04/07/2023, 10:15 PMchientrm
04/08/2023, 3:16 AMStudent(id, name)
.
User can change student info.
Is it a good idea to add an extra field Student(id, seed, name)
where seed
changes every time name
changes.
Then in my worker, I can do:
ts
fetch(`${API}/student/${id}/seed/${seed}`, { cf : { cacheEverything: true } })
So that I can cache student record indefinitely without worrying about stale data 🤔chientrm
04/08/2023, 3:19 AMupdatedAt
instead of seed
.chientrm
04/08/2023, 3:22 AMxHyroM
04/08/2023, 9:16 AMbot:dev: [mf:err] VMScriptRunnerError [ERR_MODULE_RULE]: Unable to resolve "dist\worker.mjs" dependency "node:events": no matching module rules.
bot:dev: If you're trying to import an npm package, you'll need to bundle your Worker first.
also I need a little advice. I'm making a serverless discord bot, and I have a /setup command that sends a message with a select menu. In discord.js I could then use interaction.awaitMessageComponentInteraction
but in this case I can't. I was thinking of making my own such function that would listen for an EventEmitter that would be global, but I'm not sure if that's the best solution. Because I want to have everything in one function, and I don't want to separate it in any way. If you have any ideas, I'd certainly be happy to.drathier
04/08/2023, 9:21 AMdurable objects
sounds very persistent to me, but apparently they get thrown away if not in use?chientrm
04/08/2023, 9:21 AMchientrm
04/08/2023, 9:22 AMHardAtWork
04/08/2023, 9:25 AMdrathier
04/08/2023, 9:43 AMHardAtWork
04/08/2023, 9:44 AMchientrm
04/08/2023, 9:44 AMdrathier
04/08/2023, 9:46 AMHardAtWork
04/08/2023, 9:47 AMchientrm
04/08/2023, 9:47 AMdrathier
04/08/2023, 9:49 AMHardAtWork
04/08/2023, 9:50 AMdrathier
04/08/2023, 9:50 AMHardAtWork
04/08/2023, 9:51 AMdrathier
04/08/2023, 9:53 AMxHyroM
04/08/2023, 9:57 AMxHyroM
04/08/2023, 9:58 AMdrathier
04/08/2023, 9:59 AMdrathier
04/08/2023, 9:59 AMDeleted Account
04/08/2023, 11:04 AMexport default {
fetch(req) {
const url = new URL(req.url);
url.hostname = 'exampledomain.com';
return fetch(url, req)
}
};
Skye
04/08/2023, 11:05 AMSkye
04/08/2023, 11:05 AMDeleted Account
04/08/2023, 11:06 AM