Migrate method findCompletedByType() to Doctrine

[MAILPOET-2996]
This commit is contained in:
Rodrigo Primo
2021-09-28 15:26:40 -03:00
committed by Veljko V
parent 709b4d8fcd
commit e69a3f9a53
8 changed files with 20 additions and 54 deletions

View File

@@ -168,10 +168,6 @@ class ScheduledTask extends Model {
return self::findByTypeAndStatus($type, ScheduledTask::STATUS_SCHEDULED, $limit, true);
}
public static function findCompletedByType($type, $limit = null) {
return self::findByTypeAndStatus($type, ScheduledTask::STATUS_COMPLETED, $limit);
}
private static function findByTypeAndStatus($type, $status, $limit = null, $future = false) {
$query = ScheduledTask::where('type', $type)
->whereNull('deleted_at');