8fc8f57b39
* WIP * Allow marqsv2 and v2 graphile to run in parallel * Fix missing GraphileLogger import * Fixed heartbeat after rebase * Replace postgres based run counters with redis ones with a backfill * Add back in the graphile logger * Remove duplicate visibility timeout calls * Clamp simple weighted strategy to max of 5
8 lines
234 B
TypeScript
8 lines
234 B
TypeScript
import { customAlphabet } from "nanoid";
|
|
|
|
const idGenerator = customAlphabet("123456789abcdefghijkmnopqrstuvwxyz", 21);
|
|
|
|
export function generateFriendlyId(prefix: string, size?: number) {
|
|
return `${prefix}_${idGenerator(size)}`;
|
|
}
|