1
1
package fi .vm .sade .hakurekisteri .integration .ytl
2
2
3
- import akka .actor .{Actor , ActorLogging , ActorRef }
3
+ import akka .actor .{Actor , ActorLogging , ActorRef , ActorSystem }
4
4
import akka .pattern .pipe
5
5
import fi .vm .sade .hakurekisteri .Config
6
6
import fi .vm .sade .hakurekisteri .integration .ExecutorUtil
7
7
import fi .vm .sade .hakurekisteri .integration .hakemus .{HetuPersonOid , IHakemusService }
8
- import fi .vm .sade .hakurekisteri .integration .henkilo .{
9
- Henkilo ,
10
- IOppijaNumeroRekisteri ,
11
- PersonOidsWithAliases
12
- }
8
+ import fi .vm .sade .hakurekisteri .integration .henkilo .{Henkilo , IOppijaNumeroRekisteri , PersonOidsWithAliases }
13
9
import fi .vm .sade .properties .OphProperties
14
10
import org .apache .commons .io .IOUtils
15
11
import scalaz .concurrent .Task
@@ -52,7 +48,7 @@ class YtlFetchActor(
52
48
val minIntervalBetween = 1000 * 60 * 60 * 22 // At least 22 hours between nightly syncs
53
49
54
50
implicit val ec : ExecutionContext = ExecutorUtil .createExecutor(
55
- config.integrations.asyncOperationThreadPoolSize ,
51
+ 20 ,
56
52
getClass.getSimpleName
57
53
)
58
54
@@ -99,7 +95,7 @@ class YtlFetchActor(
99
95
log.error(t, s " ( $tunniste) Manual sync for haku ${s.hakuOid} failed... " )
100
96
}
101
97
log.info(s " Ytl-sync käynnistetty haulle ${s.hakuOid} tunnisteella $tunniste" )
102
- resultF pipeTo sender
98
+ sender ! tunniste
103
99
case s : YtlSyncSingle =>
104
100
if (s.needsToBeActiveKkHakuOid.forall(oid => activeKKHakuOids.get().contains(oid))) {
105
101
val tunniste = s.tunniste
@@ -110,7 +106,7 @@ class YtlFetchActor(
110
106
case Failure (t) =>
111
107
log.error(t, s " ( $tunniste) Manual sync for person ${s.personOid} failed... " )
112
108
}
113
- log.info(s " Ytl-sync käynnistetty haulle ${s.personOid} tunnisteella $tunniste" )
109
+ log.info(s " Ytl-sync käynnistetty oidille ${s.personOid} tunnisteella $tunniste" )
114
110
resultF pipeTo sender
115
111
} else {
116
112
val infoStr = s " Not ytl-syncing $s because the haku is not an active kk-haku "
0 commit comments