Skip to content

Commit 934bef2

Browse files
committed
Add cron to run tests workflow once per week on monday
1 parent 6f07289 commit 934bef2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- trying
99
- staging
1010
- main
11+
schedule:
12+
- cron: '0 3 * * 1'
1113

1214
env:
1315
fail-fast: true

src/EventListener/DoctrineEventSubscriber.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,16 @@ public function __construct(SearchService $searchService)
1818

1919
public function postUpdate(LifecycleEventArgs $args): void
2020
{
21-
if (!$this->searchService->isSearchable($args->getObject())) {
22-
return;
23-
}
2421
$this->searchService->index($args->getObjectManager(), $args->getObject());
2522
}
2623

2724
public function postPersist(LifecycleEventArgs $args): void
2825
{
29-
if (!$this->searchService->isSearchable($args->getObject())) {
30-
return;
31-
}
3226
$this->searchService->index($args->getObjectManager(), $args->getObject());
3327
}
3428

3529
public function preRemove(LifecycleEventArgs $args): void
3630
{
37-
if (!$this->searchService->isSearchable($args->getObject())) {
38-
return;
39-
}
4031
$this->searchService->remove($args->getObjectManager(), $args->getObject());
4132
}
4233
}

0 commit comments

Comments
 (0)