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

Dont exit early when running only scheduled tasks #4707

Merged
merged 2 commits into from
May 8, 2024

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented May 7, 2024

Lemmy would exit immediately when running only scheduled tasks, instead of running forever as it should. It was broken in this commit.

Edit: You can test it with cargo run -- --disable-http-server --disable-activity-sending

@dullbananas
Copy link
Collaborator

This makes the migration check in CI run forever

@@ -218,17 +218,15 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> {
let mut interrupt = tokio::signal::unix::signal(SignalKind::interrupt())?;
let mut terminate = tokio::signal::unix::signal(SignalKind::terminate())?;

if server.is_some() || federate.is_some() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with an environment variable check and set the variable in CI. This check can be removed in #4673.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most pipeline runners set CI env var automatically. Including Woodpecker you can use that one instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would work if there's an env var that's different for each step

@Nutomic
Copy link
Member Author

Nutomic commented May 8, 2024

I think this approach is simpler.

@Nutomic Nutomic force-pushed the scheduled_tasks_await branch from b0f3c60 to b3d9d7d Compare May 8, 2024 08:50
@Nutomic Nutomic merged commit b4f9ef2 into main May 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants