Skip to content

Commit 95fe45c

Browse files
committed
Do not need previousScheduled
1 parent de6d689 commit 95fe45c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

app/lib/task/models.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,6 @@ class PackageVersionStateInfo {
320320
/// comparison. Please use [isAuthorized] for validating a request.
321321
final String? secretToken;
322322

323-
/// The previous scheduled timestamp (if we are currently in an active schedule).
324-
final DateTime? previousScheduled;
325-
326323
/// Return true, if [token] matches [secretToken] and it has not expired.
327324
///
328325
/// This does a fixed-time comparison to mitigate timing attacks.
@@ -351,7 +348,6 @@ class PackageVersionStateInfo {
351348
this.docs = false,
352349
this.pana = false,
353350
this.finished = false,
354-
this.previousScheduled,
355351
});
356352

357353
factory PackageVersionStateInfo.fromJson(Map<String, dynamic> m) =>
@@ -381,7 +377,6 @@ class PackageVersionStateInfo {
381377
zone: null,
382378
instance: null, // version is no-longer running on this instance
383379
secretToken: null, // TODO: Consider retaining this for idempotency
384-
previousScheduled: null,
385380
);
386381
}
387382

@@ -399,14 +394,13 @@ class PackageVersionStateInfo {
399394
finished: finished,
400395
docs: docs,
401396
pana: pana,
402-
previousScheduled: scheduled,
403397
);
404398
}
405399

406400
/// Reverts the status of the last scheduling attempt, which has presumably failed.
407401
PackageVersionStateInfo resetAfterFailedAttempt() {
408402
return PackageVersionStateInfo(
409-
scheduled: previousScheduled ?? initialTimestamp,
403+
scheduled: initialTimestamp,
410404
attempts: max(0, attempts - 1),
411405
zone: null,
412406
instance: null,

app/lib/task/models.g.dart

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)