@defer/client
Advanced tools
Changelog
1.0.0
#29 859bf46
Thanks @gearnode! - Add concurrency limit option.
import { defer } from "@defer/client";
async function oneByOne() {
// do something...
}
export default defer(oneByOne, { concurrency: 1 });
#34 fe251f2
Thanks @charlypoly! - BREAKING CHANGE:
defer.schedule()
to defer.cron()
defer.cron()
no longer takes a english string but a CRON tab stringimport { defer } from "@defer.run/client";
const weeklyBrief = async () => {
// ...
};
export default defer.cron(weeklyBrief, "5 0 * * *");
#34 e399d75
Thanks @charlypoly! - Deprecate defer.await()
in favor of awaitResult(deferFn)
import { importContacts } from "../defer/importContacts";
const importContactWithResult = awaitResult(importContacts);
const result = await importContactWithResult("1", []);