broad-sundown-26978
04/30/2023, 5:46 PMrust
#[shuttle_runtime::main]
async fn init() -> Result<Runner, shuttle_service::error::Error> {
error!("test");
Ok(Runner)
}
the command cargo shuttle logs --latest
does not show any error but says that everything completed successfully. how to view the logs? i can't start a tracing subscriber because one is already install (i guess?) ...
works fine on local builds. also, everything inside the bind
function of runner doesn't get executed (i guess) while it does on local runs.enough-oil-62271
04/30/2023, 5:57 PMbroad-sundown-26978
04/30/2023, 6:17 PMenough-oil-62271
04/30/2023, 6:19 PMagreeable-painting-48846
04/30/2023, 9:54 PMenough-oil-62271
04/30/2023, 10:12 PMenough-oil-62271
04/30/2023, 10:13 PMbroad-sundown-26978
05/01/2023, 4:34 AMagreeable-painting-48846
05/01/2023, 8:28 AMagreeable-painting-48846
05/01/2023, 8:29 AMagreeable-painting-48846
05/01/2023, 8:29 AMbroad-sundown-26978
05/01/2023, 10:16 AMstocky-kangaroo-53672
05/02/2023, 8:17 AMcargo shuttle deployment list
show?broad-sundown-26978
05/02/2023, 8:19 AM637c5ebf-a3c0-49d4-aa2b-3a197526498a
is the last log id and all deployments completed successfullybroad-sundown-26978
05/02/2023, 8:19 AMcompleted
)broad-sundown-26978
05/02/2023, 8:19 AMenough-oil-62271
05/02/2023, 12:29 PMbroad-sundown-26978
05/02/2023, 1:31 PMenough-oil-62271
05/02/2023, 1:34 PMenough-oil-62271
05/02/2023, 3:42 PMbroad-sundown-26978
05/02/2023, 4:06 PMagreeable-painting-48846
05/02/2023, 4:07 PMbroad-sundown-26978
05/02/2023, 4:08 PMbroad-sundown-26978
05/02/2023, 4:08 PMbroad-sundown-26978
05/02/2023, 4:12 PMbroad-sundown-26978
05/02/2023, 4:14 PMjs
2023-05-02T18:13:48.622191404Z INFO Finished release [optimized] target(s) in 48.83s
2023-05-02T18:13:48.638522773Z INFO Entering built state
2023-05-02T18:13:48.638719576Z INFO Entering loading state
2023-05-02T18:13:48.642999378Z TRACE shuttle_deployer::runtime_manager: making new client
2023-05-02T18:13:48.647627424Z DEBUG shuttle_deployer::runtime_manager: Starting alpha runtime at: /opt/shuttle/shuttle-executables/d74c6f91-801e-4d7f-aef5-9adf27c30656
2023-05-02T18:13:50.651486547Z INFO shuttle_proto::runtime: connecting runtime client
2023-05-02T18:13:50.651566085Z DEBUG hyper::client::connect::http: connecting to 127.0.0.1:19017
2023-05-02T18:13:50.654014389Z DEBUG hyper::client::connect::http: connected to 127.0.0.1:19017
2023-05-02T18:13:50.656603753Z DEBUG {service.ready=true} tower::buffer::worker: processing request
2023-05-02T18:13:50.659392746Z INFO shuttle_deployer::deployment::run: loading project from: /opt/shuttle/shuttle-executables/d74c6f91-801e-4d7f-aef5-9adf27c30656
2023-05-02T18:13:50.661255403Z DEBUG shuttle_deployer::deployment::run: loading service
2023-05-02T18:13:50.663596475Z DEBUG {service.ready=true} tower::buffer::worker: processing request
2023-05-02T18:13:50.675638107Z INFO {success="true"} shuttle_deployer::deployment::run: loading response
No resources are linked to this service
Service Name: hcaptcha-solver-test
Deployment ID: d74c6f91-801e-4d7f-aef5-9adf27c30656
Status: running
Last Updated: 2023-05-02T16:13:50Z
URI: https://hcaptcha-solver-test.shuttleapp.rs
(javascript coloring, because why not)broad-sundown-26978
05/02/2023, 4:18 PMNo resourcse are linked to this service
mean?enough-oil-62271
05/02/2023, 4:21 PMbroad-sundown-26978
05/02/2023, 4:21 PMbroad-sundown-26978
05/02/2023, 4:21 PMenough-oil-62271
05/02/2023, 4:21 PMbroad-sundown-26978
05/02/2023, 4:23 PMrust
struct Runner;
#[shuttle_runtime::async_trait]
impl Service for Runner {
async fn bind(mut self, addr: SocketAddr) -> Result<(), shuttle_service::error::Error> {
_init(addr).await.context("running ?")?;
Ok(())
}
}
#[shuttle_runtime::main]
async fn init() -> Result<Runner, shuttle_service::error::Error> {
error!("test");
Ok(Runner)
}
with the init function; nothing logs, no unwraps/expects used in the code (so hopefully no panics or so)enough-oil-62271
05/02/2023, 5:39 PMbind()
is to simply never return; you call whatever method on the things you're using or custom code that does the central logic and never returns. For discord bots that's listening to whatever discord sends their way on a more or less infinite loop, servers are generally bound to an incoming port and listen for connections, etc.
So if _init(addr)
returns, like, ever, (since nothing else in bind()
will prevent it from finishing) then the service would stop and gracefully shut down, I think?agreeable-painting-48846
05/02/2023, 5:42 PMgentle-ice-1561
05/02/2023, 10:28 PMgentle-ice-1561
05/02/2023, 10:29 PMagreeable-painting-48846
05/02/2023, 10:31 PMbroad-sundown-26978
05/03/2023, 4:14 AMenough-oil-62271
05/03/2023, 4:30 AMbroad-sundown-26978
05/03/2023, 4:30 AM