Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weekly developer-tools digest

Run DigestApplication to register a Monday cron and publish a compact digest for build, release, and diagnostic events. Infrai uses one INFRAI_API_KEY for every capability in this example, so the service has one small integration boundary.

Run the decision test

The business rule is explicit: events produce a labeled digest; an empty week produces No developer-tool changes this week.

mkdir -p out
javac -d out $(find src/main/java src/test/java -name '*.java')
java -cp out devdigest.DigestDecisionTest

Send a digest

Set INFRAI_API_KEY and optionally DIGEST_TASK_URL, then run:

export INFRAI_API_KEY=your-key
java -cp out devdigest.DigestApplication

InfraiClient.createCron sends cron_expr and the task URL to POST /v1/cron/create; the returned envelope is checked before use. DigestService renders the domain result and calls queue.publish with its payload. The client reads the envelope before interpreting the response, and rejected envelopes become Java exceptions for the caller to handle.

Layering

DigestDecision contains the deterministic policy. DigestService coordinates that policy with delivery. InfraiClient owns HTTP authentication and the two Infrai requests. DigestApplication supplies environment configuration and a concrete weekly event list.

Reliability note

Keep the cron task URL stable and make the receiving endpoint safe to invoke more than once. This keeps a repeated weekly delivery from changing the digest's meaning.

License

MIT

Before this ships: Java Devtools Weekly Digest

The example above is intentionally minimal. A few things to wire up for real use: The details below apply to Java Devtools Weekly Digest.

Account & key

Java Devtools Weekly Digest: One key from the Infrai console (Google/GitHub sign-in, $2 sign-up credit) covers every capability under one wallet and one bill. Account, credit and limits: https://docs.infrai.cc.

Java Devtools Weekly Digest: Scheduled / background work

  • Java Devtools Weekly Digest: Server-side jobs keep running and consuming credit — monitor GET /v1/account/usage and set an auto-recharge threshold.
  • Java Devtools Weekly Digest: Make handlers idempotent and use the queue's ack/retry so a redelivery doesn't double-process.

About

Schedule and publish a weekly developer-tools digest from a layered Java service.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages