hammerkit 1.27.0-next.15 → 1.27.0-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -638,13 +638,15 @@ class RunRegistry {
638
638
  entry.durationTimer = undefined;
639
639
  entry.targets = targets.map((target) => ({ ...target, address: { ...target.address } }));
640
640
  entry.run.state = 'up';
641
+ // one reading of the clock, so the ttl is exactly expiresAt - upAt
642
+ const now = this.now();
641
643
  // the ttl counts from the first time, not from a wake
642
644
  if (!entry.run.upAt) {
643
- entry.run.upAt = this.timestamp();
644
- entry.run.expiresAt = new Date(this.now() + spec.ttl).toISOString();
645
+ entry.run.upAt = new Date(now).toISOString();
646
+ entry.run.expiresAt = new Date(now + spec.ttl).toISOString();
645
647
  }
646
648
  if (spec.sleepTtl) {
647
- entry.run.sleepsAt = new Date(this.now() + spec.sleepTtl).toISOString();
649
+ entry.run.sleepsAt = new Date(now + spec.sleepTtl).toISOString();
648
650
  }
649
651
  this.record(entry, { type: 'state', state: 'up' });
650
652
  this.expireLater(entry);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hammerkit",
3
3
  "description": "Containerized build tool with incremental caching that runs the same build file locally, in Docker and on Kubernetes.",
4
- "version": "1.27.0-next.15",
4
+ "version": "1.27.0-next.16",
5
5
  "keywords": [
6
6
  "build",
7
7
  "build-tool",