Add new email-server-worker project implementing a self-scheduling background worker pattern with HTTP monitoring. Removed all business-specific code from copied source, creating a clean, reusable template. Key features: - Self-scheduling worker loop with configurable interval - Graceful shutdown support (Docker-compatible) - Prometheus metrics collection - Health check endpoints (/healthcheck, /metrics, /ping) - Example worker template for easy customization - Comprehensive architecture documentation in CLAUDE.md The worker is now ready for email server implementation with no external dependencies on Evolution/MSSQL/ElasticSearch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
529 B
TypeScript
29 lines
529 B
TypeScript
import { LabelValues } from "prom-client";
|
|
|
|
export class Counter {
|
|
public inc() {
|
|
|
|
}
|
|
}
|
|
|
|
export class Histogram<T extends string> {
|
|
startTimer(labels?: LabelValues<T>): (labels?: LabelValues<T>) => void {
|
|
return((labels?: LabelValues<T>) => { });
|
|
}
|
|
}
|
|
|
|
class Register {
|
|
public setDefaultLabels(labels: Object) {
|
|
|
|
}
|
|
|
|
public metrics(): Promise<string> {
|
|
return(Promise.resolve(""));
|
|
}
|
|
|
|
public get contentType() {
|
|
return("");
|
|
}
|
|
}
|
|
|
|
export const register = new Register(); |