mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-08 21:34:22 +03:00
parent
9ff36a13cf
commit
221c6db0ae
@ -10,8 +10,10 @@ load(
|
||||
load("@build_environment//:configuration.bzl", "sdk_version")
|
||||
|
||||
da_scala_library(
|
||||
name = "trigger-service-lib",
|
||||
name = "trigger-service",
|
||||
srcs = glob(["src/main/scala/**/*.scala"]),
|
||||
# Uncomment this if/when the target is published to maven.
|
||||
# tags = ["maven_coordinates=com.daml:trigger-service:__VERSION__"],
|
||||
visibility = ["//visibility:public"],
|
||||
runtime_deps = [
|
||||
"@maven//:ch_qos_logback_logback_classic",
|
||||
@ -46,11 +48,11 @@ da_scala_library(
|
||||
)
|
||||
|
||||
da_scala_binary(
|
||||
name = "trigger-service",
|
||||
name = "trigger-service-binary",
|
||||
main_class = "com.daml.lf.engine.trigger.ServiceMain",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":trigger-service-lib",
|
||||
":trigger-service",
|
||||
],
|
||||
)
|
||||
|
||||
@ -60,7 +62,7 @@ da_scala_test(
|
||||
data = [":test-model.dar"],
|
||||
resources = glob(["src/test/resources/**/*"]),
|
||||
deps = [
|
||||
":trigger-service-lib",
|
||||
":trigger-service",
|
||||
"//bazel_tools/runfiles:scala_runfiles",
|
||||
"//daml-lf/archive:daml_lf_archive_reader",
|
||||
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
|
||||
@ -111,3 +113,5 @@ EOF
|
||||
tools = ["//compiler/damlc"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
exports_files(["release/trigger-service-logback.xml"])
|
||||
|
@ -24,10 +24,15 @@ until nc -z $LEDGER_HOST $LEDGER_PORT; do
|
||||
done
|
||||
echo "Connected to sandbox."
|
||||
|
||||
bazel run //triggers/service:trigger-service -- \
|
||||
bazel run //triggers/service:trigger-service-binary -- \
|
||||
--ledger-host $LEDGER_HOST --ledger-port $LEDGER_PORT --wall-clock-time &
|
||||
TRIGGER_SERVICE_PID=$!
|
||||
|
||||
# A smoke test:
|
||||
# curl -X GET \
|
||||
# -H "Content-type: application/json" -H "Accept: application/json" \
|
||||
# "http://localhost:8080/test"
|
||||
|
||||
kill_everything() {
|
||||
kill $TRIGGER_SERVICE_PID || true
|
||||
kill $SANDBOX_PID || true
|
||||
|
17
triggers/service/release/trigger-service-logback.xml
Normal file
17
triggers/service/release/trigger-service-logback.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="io.netty" level="WARN">
|
||||
<appender-ref ref="stderr-appender"/>
|
||||
</logger>
|
||||
<logger name="io.grpc.netty" level="WARN">
|
||||
<appender-ref ref="stderr-appender"/>
|
||||
</logger>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user