| Line |
Stmt Id |
Pos |
Tree |
Symbol |
Tests |
Code |
|
63
|
49617
|
2222
-
2244
|
Select
|
org.make.api.technical.MigrationApi.modifyAvatarsSwiftPath
|
|
MigrationApi.this.modifyAvatarsSwiftPath
|
|
83
|
41347
|
2842
-
2845
|
Select
|
akka.http.scaladsl.server.directives.MethodDirectives.get
|
|
DefaultMigrationApi.this.get
|
|
83
|
49656
|
2842
-
2929
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.get).apply(server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations"))).apply(DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.OK)(marshalling.this.Marshaller.fromStatusCode))))
|
|
84
|
34248
|
2861
-
2873
|
ApplyImplicitView
|
akka.http.scaladsl.server.ImplicitPathMatcherConstruction._segmentStringToPathMatcher
|
|
DefaultMigrationApi.this._segmentStringToPathMatcher("migrations")
|
|
84
|
32625
|
2856
-
2921
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations"))).apply(DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.OK)(marshalling.this.Marshaller.fromStatusCode)))
|
|
84
|
46232
|
2856
-
2874
|
Apply
|
akka.http.scaladsl.server.directives.PathDirectives.path
|
|
DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations"))
|
|
85
|
43133
|
2896
-
2910
|
Select
|
akka.http.scaladsl.model.StatusCodes.OK
|
|
akka.http.scaladsl.model.StatusCodes.OK
|
|
85
|
39747
|
2887
-
2911
|
Apply
|
akka.http.scaladsl.server.directives.RouteDirectives.complete
|
|
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.OK)(marshalling.this.Marshaller.fromStatusCode))
|
|
85
|
48635
|
2896
-
2910
|
ApplyToImplicitArgs
|
akka.http.scaladsl.marshalling.ToResponseMarshallable.apply
|
|
marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.OK)(marshalling.this.Marshaller.fromStatusCode)
|
|
85
|
35267
|
2908
-
2908
|
Select
|
akka.http.scaladsl.marshalling.PredefinedToResponseMarshallers.fromStatusCode
|
|
marshalling.this.Marshaller.fromStatusCode
|
|
89
|
42178
|
2980
-
5133
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.post).apply(server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations")./[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("modify-avatars-swift-path"))(TupleOps.this.Join.join0P[Unit]))).apply(server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultMigrationApiComponent.this.makeOperation("ModifyAvatarsSwiftPath", DefaultMigrationApiComponent.this.makeOperation$default$2, DefaultMigrationApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultMigrationApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((userAuth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)).apply(server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
})))))))))
|
|
89
|
41261
|
2980
-
2984
|
Select
|
akka.http.scaladsl.server.directives.MethodDirectives.post
|
|
DefaultMigrationApi.this.post
|
|
90
|
45277
|
2993
-
5127
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addByNameNullaryApply(DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations")./[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("modify-avatars-swift-path"))(TupleOps.this.Join.join0P[Unit]))).apply(server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultMigrationApiComponent.this.makeOperation("ModifyAvatarsSwiftPath", DefaultMigrationApiComponent.this.makeOperation$default$2, DefaultMigrationApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultMigrationApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((userAuth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)).apply(server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
}))))))))
|
|
90
|
47792
|
2993
-
3041
|
Apply
|
akka.http.scaladsl.server.directives.PathDirectives.path
|
|
DefaultMigrationApi.this.path[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("migrations")./[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("modify-avatars-swift-path"))(TupleOps.this.Join.join0P[Unit]))
|
|
90
|
42884
|
3011
-
3011
|
TypeApply
|
akka.http.scaladsl.server.util.TupleOps.Join.join0P
|
|
TupleOps.this.Join.join0P[Unit]
|
|
90
|
34283
|
2998
-
3010
|
Literal
|
<nosymbol>
|
|
"migrations"
|
|
90
|
46268
|
3013
-
3040
|
ApplyImplicitView
|
akka.http.scaladsl.server.ImplicitPathMatcherConstruction._segmentStringToPathMatcher
|
|
DefaultMigrationApi.this._segmentStringToPathMatcher("modify-avatars-swift-path")
|
|
90
|
35307
|
2998
-
3040
|
ApplyToImplicitArgs
|
akka.http.scaladsl.server.PathMatcher./
|
|
DefaultMigrationApi.this._segmentStringToPathMatcher("migrations")./[Unit](DefaultMigrationApi.this._segmentStringToPathMatcher("modify-avatars-swift-path"))(TupleOps.this.Join.join0P[Unit])
|
|
91
|
32660
|
3052
-
3052
|
Select
|
org.make.api.technical.MakeDirectives.makeOperation$default$2
|
|
DefaultMigrationApiComponent.this.makeOperation$default$2
|
|
91
|
32950
|
3052
-
5119
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addDirectiveApply[(org.make.core.RequestContext,)](DefaultMigrationApiComponent.this.makeOperation("ModifyAvatarsSwiftPath", DefaultMigrationApiComponent.this.makeOperation$default$2, DefaultMigrationApiComponent.this.makeOperation$default$3))(util.this.ApplyConverter.hac1[org.make.core.RequestContext]).apply(((x$1: org.make.core.RequestContext) => server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultMigrationApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((userAuth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)).apply(server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
})))))))
|
|
91
|
40814
|
3066
-
3090
|
Literal
|
<nosymbol>
|
|
"ModifyAvatarsSwiftPath"
|
|
91
|
33719
|
3065
-
3065
|
TypeApply
|
akka.http.scaladsl.server.util.ApplyConverterInstances.hac1
|
|
util.this.ApplyConverter.hac1[org.make.core.RequestContext]
|
|
91
|
49411
|
3052
-
3052
|
Select
|
org.make.api.technical.MakeDirectives.makeOperation$default$3
|
|
DefaultMigrationApiComponent.this.makeOperation$default$3
|
|
91
|
41297
|
3052
-
3091
|
Apply
|
org.make.api.technical.MakeDirectives.makeOperation
|
|
DefaultMigrationApiComponent.this.makeOperation("ModifyAvatarsSwiftPath", DefaultMigrationApiComponent.this.makeOperation$default$2, DefaultMigrationApiComponent.this.makeOperation$default$3)
|
|
92
|
42926
|
3109
-
3109
|
TypeApply
|
akka.http.scaladsl.server.util.ApplyConverterInstances.hac1
|
|
util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]
|
|
92
|
39781
|
3109
-
5109
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addDirectiveApply[(scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights],)](DefaultMigrationApiComponent.this.makeOAuth2)(util.this.ApplyConverter.hac1[scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]]).apply(((userAuth: scalaoauth2.provider.AuthInfo[org.make.core.auth.UserRights]) => server.this.Directive.addByNameNullaryApply(DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)).apply(server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
})))))
|
|
92
|
46779
|
3109
-
3119
|
Select
|
org.make.api.technical.auth.MakeAuthentication.makeOAuth2
|
|
DefaultMigrationApiComponent.this.makeOAuth2
|
|
93
|
34526
|
3163
-
3176
|
Select
|
scalaoauth2.provider.AuthInfo.user
|
|
userAuth.user
|
|
93
|
48668
|
3146
-
5097
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addByNameNullaryApply(DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)).apply(server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
})))
|
|
93
|
47829
|
3146
-
3177
|
Apply
|
org.make.api.technical.MakeAuthenticationDirectives.requireAdminRole
|
|
DefaultMigrationApiComponent.this.requireAdminRole(userAuth.user)
|
|
94
|
49446
|
3212
-
3212
|
Select
|
akka.http.scaladsl.unmarshalling.PredefinedFromStringUnmarshallers.booleanFromStringUnmarshaller
|
|
unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller
|
|
94
|
31146
|
3194
-
5083
|
Apply
|
scala.Function1.apply
|
|
server.this.Directive.addDirectiveApply[(Boolean,)](DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)))(util.this.ApplyConverter.hac1[Boolean]).apply(((dry: Boolean) => {
val batchSize: Int = 1000;
val startTime: Long = java.lang.System.currentTimeMillis();
val eventDate: java.time.ZonedDateTime = org.make.core.DateHelper.now();
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global);
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
}))
|
|
94
|
41338
|
3204
-
3221
|
ApplyToImplicitArgs
|
akka.http.scaladsl.server.directives.ParameterDirectives.ParamSpec.forNR
|
|
ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller)
|
|
94
|
33463
|
3194
-
3222
|
Apply
|
akka.http.scaladsl.server.directives.ParameterDirectivesInstances.parameter
|
|
DefaultMigrationApi.this.parameter(ParameterDirectives.this.ParamSpec.forNR[Boolean](DefaultMigrationApi.this._string2NR("dry").as[Boolean])(unmarshalling.this.Unmarshaller.booleanFromStringUnmarshaller))
|
|
94
|
32422
|
3204
-
3221
|
TypeApply
|
akka.http.scaladsl.common.NameReceptacle.as
|
|
DefaultMigrationApi.this._string2NR("dry").as[Boolean]
|
|
94
|
46223
|
3203
-
3203
|
TypeApply
|
akka.http.scaladsl.server.util.ApplyConverterInstances.hac1
|
|
util.this.ApplyConverter.hac1[Boolean]
|
|
94
|
40233
|
3204
-
3209
|
Literal
|
<nosymbol>
|
|
"dry"
|
|
95
|
38973
|
3269
-
3273
|
Literal
|
<nosymbol>
|
|
1000
|
|
96
|
34564
|
3306
-
3332
|
Apply
|
java.lang.System.currentTimeMillis
|
|
java.lang.System.currentTimeMillis()
|
|
97
|
47870
|
3365
-
3381
|
Apply
|
org.make.core.DefaultDateHelper.now
|
|
org.make.core.DateHelper.now()
|
|
99
|
34039
|
3450
-
3450
|
Select
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
101
|
41138
|
3504
-
3911
|
Apply
|
org.make.api.user.UserService.adminFindUsers
|
|
DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)
|
|
102
|
40766
|
3556
-
3581
|
Apply
|
org.make.core.technical.Pagination.Offset.apply
|
|
org.make.core.technical.Pagination.Offset.apply(offset)
|
|
103
|
41099
|
3607
-
3647
|
Apply
|
scala.Some.apply
|
|
scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize)))
|
|
103
|
31855
|
3627
-
3645
|
Apply
|
scala.Int.+
|
|
offset.+(batchSize)
|
|
103
|
49978
|
3612
-
3646
|
Apply
|
org.make.core.technical.Pagination.End.apply
|
|
org.make.core.technical.Pagination.End.apply(offset.+(batchSize))
|
|
104
|
33503
|
3673
-
3677
|
Select
|
scala.None
|
|
scala.None
|
|
105
|
47280
|
3703
-
3707
|
Select
|
scala.None
|
|
scala.None
|
|
106
|
38399
|
3733
-
3737
|
Select
|
scala.None
|
|
scala.None
|
|
107
|
34599
|
3763
-
3767
|
Select
|
scala.None
|
|
scala.None
|
|
108
|
47618
|
3793
-
3797
|
Select
|
scala.None
|
|
scala.None
|
|
109
|
40805
|
3823
-
3827
|
Select
|
scala.None
|
|
scala.None
|
|
110
|
32922
|
3853
-
3857
|
Select
|
scala.None
|
|
scala.None
|
|
111
|
49400
|
3883
-
3887
|
Select
|
scala.None
|
|
scala.None
|
|
115
|
40560
|
3986
-
4053
|
Apply
|
scala.collection.IterableOps.map
|
|
users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl)))))
|
|
115
|
35048
|
4019
-
4052
|
Apply
|
scala.Option.flatMap
|
|
user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))
|
|
115
|
47321
|
4004
-
4015
|
Select
|
org.make.core.user.User.userId
|
|
user.userId
|
|
115
|
38926
|
4040
-
4051
|
Select
|
org.make.core.profile.Profile.avatarUrl
|
|
x$2.avatarUrl
|
|
115
|
47656
|
4004
-
4052
|
Apply
|
scala.Predef.ArrowAssoc.->
|
|
scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl)))
|
|
117
|
32961
|
4103
-
4111
|
Apply
|
scala.Predef.identity
|
|
scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x)
|
|
118
|
45734
|
4172
-
4187
|
Apply
|
scala.Predef.ArrowAssoc.->
|
|
scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
|
|
118
|
41586
|
4140
-
4140
|
Apply
|
org.make.api.technical.DefaultMigrationApiComponent.DefaultMigrationApi.$anonfun.<init>
|
|
new $anonfun()
|
|
119
|
34075
|
4218
-
4219
|
Literal
|
<nosymbol>
|
|
5
|
|
122
|
47069
|
4324
-
4344
|
Apply
|
scala.concurrent.Future.successful
|
|
scala.concurrent.Future.successful[Int](1)
|
|
122
|
38961
|
4324
-
4344
|
Block
|
scala.concurrent.Future.successful
|
|
scala.concurrent.Future.successful[Int](1)
|
|
125
|
35090
|
4474
-
4494
|
Select
|
org.make.core.RequestContext.empty
|
|
org.make.core.RequestContext.empty
|
|
126
|
45490
|
4400
-
4545
|
Block
|
scala.concurrent.Future.map
|
|
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
|
|
126
|
32995
|
4400
-
4545
|
ApplyToImplicitArgs
|
scala.concurrent.Future.map
|
|
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
|
|
126
|
40592
|
4537
-
4537
|
Select
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
126
|
47572
|
4543
-
4544
|
Literal
|
<nosymbol>
|
|
1
|
|
129
|
47104
|
4619
-
4619
|
Select
|
org.make.api.technical.ActorSystemComponent.actorSystem
|
|
DefaultMigrationApiComponent.this.actorSystem
|
|
129
|
41625
|
4617
-
4618
|
Literal
|
<nosymbol>
|
|
0
|
|
129
|
33205
|
4620
-
4625
|
Apply
|
scala.Int.+
|
|
x$4.+(x$5)
|
|
129
|
39001
|
4619
-
4619
|
ApplyToImplicitArgs
|
akka.stream.Materializer.matFromSystem
|
|
stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)
|
|
130
|
45528
|
3398
-
5018
|
ApplyToImplicitArgs
|
scala.concurrent.Future.onComplete
|
|
StreamUtils.asyncPageToPageSource[org.make.core.user.User](((offset: Int) => DefaultMigrationApiComponent.this.userService.adminFindUsers(org.make.core.technical.Pagination.Offset.apply(offset), scala.Some.apply[org.make.core.technical.Pagination.End](org.make.core.technical.Pagination.End.apply(offset.+(batchSize))), scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None, scala.None)))(scala.concurrent.ExecutionContext.Implicits.global).map[Seq[(org.make.core.user.UserId, Option[String])]](((users: Seq[org.make.core.user.User]) => users.map[(org.make.core.user.UserId, Option[String])](((user: org.make.core.user.User) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](user.userId).->[Option[String]](user.profile.flatMap[String](((x$2: org.make.core.profile.Profile) => x$2.avatarUrl))))))).mapConcat[(org.make.core.user.UserId, Option[String])](((x: Seq[(org.make.core.user.UserId, Option[String])]) => scala.Predef.identity[Seq[(org.make.core.user.UserId, Option[String])]](x))).collect[(org.make.core.user.UserId, String)](({
@SerialVersionUID(value = 0) final <synthetic> class $anonfun extends scala.runtime.AbstractPartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)] with java.io.Serializable {
def <init>(): <$anon: ((org.make.core.user.UserId, Option[String])) => (org.make.core.user.UserId, String)> = {
$anonfun.super.<init>();
()
};
final override def applyOrElse[A1 <: (org.make.core.user.UserId, Option[String]), B1 >: (org.make.core.user.UserId, String)](x1: A1, default: A1 => B1): B1 = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => scala.Predef.ArrowAssoc[org.make.core.user.UserId](id).->[String](avatarUrl)
case (defaultCase$ @ _) => default.apply(x1)
};
final def isDefinedAt(x1: (org.make.core.user.UserId, Option[String])): Boolean = ((x1.asInstanceOf[(org.make.core.user.UserId, Option[String])]: (org.make.core.user.UserId, Option[String])): (org.make.core.user.UserId, Option[String]) @unchecked) match {
case (_1: org.make.core.user.UserId, _2: Option[String]): (org.make.core.user.UserId, Option[String])((id @ _), (value: String): Some[String]((avatarUrl @ _))) => true
case (defaultCase$ @ _) => false
}
};
new $anonfun()
}: PartialFunction[(org.make.core.user.UserId, Option[String]),(org.make.core.user.UserId, String)])).mapAsync[Int](5)(((x0$1: (org.make.core.user.UserId, String)) => x0$1 match {
case (_1: org.make.core.user.UserId, _2: String): (org.make.core.user.UserId, String)((id @ _), (avatarUrl @ _)) => if (dry)
scala.concurrent.Future.successful[Int](1)
else
DefaultMigrationApiComponent.this.userService.changeAvatarForUser(id, avatarUrl, org.make.core.RequestContext.empty, eventDate).map[Int](((x$3: Unit) => 1))(scala.concurrent.ExecutionContext.Implicits.global)
})).runFold[Int](0)(((x$4: Int, x$5: Int) => x$4.+(x$5)))(stream.this.Materializer.matFromSystem(DefaultMigrationApiComponent.this.actorSystem)).onComplete[Unit](((x0$2: scala.util.Try[Int]) => x0$2 match {
case (value: Int): scala.util.Success[Int]((count @ _)) => {
val time: Long = java.lang.System.currentTimeMillis().-(startTime);
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
}
case (exception: Throwable): scala.util.Failure[Int]((exception @ _)) => DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
}))(scala.concurrent.ExecutionContext.Implicits.global)
|
|
130
|
32209
|
4657
-
4657
|
Select
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
scala.concurrent.ExecutionContext.Implicits.global
|
|
132
|
31111
|
4735
-
4773
|
Apply
|
scala.Long.-
|
|
java.lang.System.currentTimeMillis().-(startTime)
|
|
133
|
47610
|
4796
-
4867
|
Apply
|
grizzled.slf4j.Logger.info
|
|
DefaultMigrationApiComponent.this.logger.info(("".+(count).+(" users have had their avatars updated in ").+(time).+(" ms"): String))
|
|
135
|
39746
|
4937
-
4998
|
Apply
|
grizzled.slf4j.Logger.error
|
|
DefaultMigrationApiComponent.this.logger.error("Error while updating avatars path:", exception)
|
|
138
|
46548
|
5045
-
5066
|
ApplyToImplicitArgs
|
akka.http.scaladsl.marshalling.ToResponseMarshallable.apply
|
|
marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode)
|
|
138
|
38757
|
5036
-
5067
|
Apply
|
akka.http.scaladsl.server.directives.RouteDirectives.complete
|
|
DefaultMigrationApi.this.complete(marshalling.this.ToResponseMarshallable.apply[akka.http.scaladsl.model.StatusCodes.Success](akka.http.scaladsl.model.StatusCodes.NoContent)(marshalling.this.Marshaller.fromStatusCode))
|
|
138
|
42142
|
5045
-
5066
|
Select
|
akka.http.scaladsl.model.StatusCodes.NoContent
|
|
akka.http.scaladsl.model.StatusCodes.NoContent
|
|
138
|
33247
|
5057
-
5057
|
Select
|
akka.http.scaladsl.marshalling.PredefinedToResponseMarshallers.fromStatusCode
|
|
marshalling.this.Marshaller.fromStatusCode
|