dispatch the ProjectDownloadJob
This commit is contained in:
parent
03564772aa
commit
42eb932ff8
|
|
@ -10,7 +10,7 @@ class DownloadNotification extends Component
|
|||
{
|
||||
public $show_download_notification;
|
||||
public Project $project;
|
||||
|
||||
// TODO Change session bool to timestamp so i can check if i show it in 5 min.
|
||||
public function mount(Project $project)
|
||||
{
|
||||
$this->show_download_notification = session()->get('show-download.'.$project->id,$project->hasMissingDownloadsDateInHarvestFile());
|
||||
|
|
|
|||
|
|
@ -350,18 +350,18 @@ public function getMosaicsFor(Carbon $endDate, int $offset= 7): array
|
|||
|
||||
public function handleMissingDownloads()
|
||||
{
|
||||
$this->getMissingDownloadsDateInHarvestFile()
|
||||
$this->getMissingDownloads()
|
||||
->each(function(Carbon $date){
|
||||
ProjectDownloadTiffJob::handleForDate($this,$date);
|
||||
dispatch(ProjectDownloadTiffJob::handleForDate($this,$date));
|
||||
});
|
||||
}
|
||||
|
||||
public function hasMissingDownloadsDateInHarvestFile():bool
|
||||
{
|
||||
return $this->getMissingDownloadsDateInHarvestFile()->count() > 0;
|
||||
return $this->getMissingDownloads()->count() > 0;
|
||||
}
|
||||
|
||||
public function getMissingDownloadsDateInHarvestFile():Collection
|
||||
public function getMissingDownloads():Collection
|
||||
{
|
||||
if(!$this->harvest_json_path || !$this->min_harvest_date){
|
||||
return collect([]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue