Anyone know of a transactional email sending service with a nice serverless compatible api client?
Anyone know of a transactional email sending service with a nice serverless compatible api client?
scheluded in my test I did this:ScheduledEvent but I didn't find anyway to mock those. The only related mocking function seems to be createScheduledController but it's type is ScheduledController which is similiar but not the same.ScheduledController or ScheduledEvent typing in the scheduled event and by following this stackoverflow answer on testing the logging: https://stackoverflow.com/questions/76042978/in-vitest-how-do-i-assert-that-a-console-log-happenedexport const sleep = (ms: number): Promise<void> => {
return new Promise<void>((resolve) => setTimeout(resolve, ms));
};

- web-srv # binds AuthService
- fetch routes:
- GET /todos/<todo-list-id> # get the list
- PUT /todos/<todo-list-id> # set the list
- todo-srv
- TodoService: Entrypoint # only accessible by auth-srv
- todoForUser(user_id): TodoUser
- TodoUser(user_id): RpcTarget
- get(id): string[]
- set(id, string[])
- auth-srv # binds TodoService
- AuthService: Entrypoint
- checkCookie() : User
- User(user_id): RpcTarget
- todos(): TodoUser- browser: GET /todos/x Cookie=foo
- web-srv: AuthService.checkCookie(foo) -> User
- web-srv: User.todos() -> TodoUser
- web-srv: TodoUser.get(x) # does this go directly to todo-srv or is there a hop through auth-srv?Concurrent Subrequest Limit
As of this release, we impose a limit on the number of outgoing HTTP requests that a worker can make simultaneously. For each incoming request, a worker can make up to 6 concurrent outgoing fetch() requests.await Promise.all(jobs.map(async (job_url) => await $fetch(job_url))*domain.com/*scheludedScheduledEventScheduledEventcreateScheduledController ScheduledControllerScheduledControllerexport const sleep = (ms: number): Promise<void> => {
return new Promise<void>((resolve) => setTimeout(resolve, ms));
};async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext): Promise<void> {
console.log('This is a scheduled event');
},it("scheduled event logs 'This is a scheduled event'", async () => {
const controller = createScheduledController({
scheduledTime: new Date(1000),
cron: "30 * * * *",
});
const ctx = createExecutionContext();
await worker.scheduled(controller, env, ctx);
await waitOnExecutionContext(ctx);
expect(ctx.log).toMatchInlineSnapshot(`"This is a scheduled event"`);
});