-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbecab7
commit 2658302
Showing
14 changed files
with
159 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
gpr.user=ricardolopezb | ||
gpr.key=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 | ||
gpr.key=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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/main/kotlin/ingsis/snippetmanager/domains/rule/repository/LinterRulesRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package ingsis.snippetmanager.domains.rule.repository | ||
|
||
import ingsis.snippetmanager.domains.rule.model.LinterRules | ||
import ingsis.snippetmanager.domains.rule.model.LinterRulesEntity | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.data.jpa.repository.Query | ||
import java.util.UUID | ||
|
||
interface LinterRulesRepository: JpaRepository<LinterRules, UUID> { | ||
interface LinterRulesRepository: JpaRepository<LinterRulesEntity, UUID> { | ||
|
||
@Query("SELECT l FROM LinterRules l WHERE l.userId = :userId") | ||
fun findByUserId(userId: String): LinterRules | ||
@Query("SELECT l FROM LinterRulesEntity l WHERE l.userId = :userId") | ||
fun findByUserId(userId: String): LinterRulesEntity | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/main/kotlin/ingsis/snippetmanager/redis/consumer/LinterResultEventConsumer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/kotlin/ingsis/snippetmanager/redis/producer/LintRequestProducer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ingsis.snippetmanager.redis.producer | ||
|
||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.beans.factory.annotation.Value | ||
import kotlinx.coroutines.reactor.awaitSingle | ||
import org.austral.ingsis.`class`.redis.RedisStreamProducer | ||
import org.springframework.data.redis.core.ReactiveRedisTemplate | ||
import org.springframework.data.redis.core.RedisTemplate | ||
import org.springframework.stereotype.Component | ||
import snippet.events.lint.LintRequestEvent | ||
import snippet.events.lint.LintResultEvent | ||
import snippet.events.lint.LintResultStatus | ||
|
||
import java.util.* | ||
|
||
@Component | ||
class LintRequestProducer @Autowired constructor( | ||
@Value("\${redis.stream.request_key}") streamKey: String, | ||
redis: ReactiveRedisTemplate<String, String> | ||
) : RedisStreamProducer(streamKey, redis) { | ||
|
||
suspend fun publishEvent(event: LintRequestEvent){ | ||
println("Publishing on stream: $streamKey") | ||
emit(event).awaitSingle() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.