Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove actix-rt depenency #38

Closed
Nutomic opened this issue May 24, 2023 · 0 comments · Fixed by #42
Closed

Remove actix-rt depenency #38

Nutomic opened this issue May 24, 2023 · 0 comments · Fixed by #42
Labels
enhancement New feature or request

Comments

@Nutomic
Copy link
Member

Nutomic commented May 24, 2023

If you create an application with tokio runtime which depends on this library, it crashes at startup with the following error:

thread 'main' panicked at 'System is not running', /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-rt-2.8.0/src/system.rs:120:211
stack backtrace:
0: std::panicking::begin_panic
at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:611:12
1: actix_rt::system::System::current::{{closure}}
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-rt-2.8.0/src/system.rs:120:21
2: std::thread::local::LocalKey<T>::try_with
at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/thread/local.rs:446:16
3: std::thread::local::LocalKey<T>::with
at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/thread/local.rs:422:9
4: actix_rt::system::System::current
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-rt-2.8.0/src/system.rs:118:9
5: actix_rt::arbiter::Arbiter::with_tokio_rt
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-rt-2.8.0/src/arbiter.rs:115:19
6: actix_rt::arbiter::Arbiter::new
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-rt-2.8.0/src/arbiter.rs:101:9
7: background_jobs_actix::Manager::new
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/background-jobs-actix-0.13.1/src/lib.rs:178:31
8: background_jobs_actix::WorkerConfig<State,background_jobs_actix::Managed>::start
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/background-jobs-actix-0.13.1/src/lib.rs:357:9
9: activitypub_federation::activity_queue::create_activity_queue
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/activitypub_federation-0.4.0/src/activity_queue.rs:229:5
10: activitypub_federation::config::FederationConfigBuilder<T>::build
at /home/felix/.cargo/registry/src/github.com-1ecc6299db9ec823/activitypub_federation-0.4.0/src/config.rs:179:21
...

This is caused by the background-jobs crate. It would be good to get rid of this requirement, so that any async runtime can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant