YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
44 stars 15 forks source link

Horizon has to be run manually #50

Closed StopTrackingUs closed 5 years ago

StopTrackingUs commented 5 years ago

So I'm guessing I am the only one running into this, but horizon does not keep running. I'll start it via ssh and hours later I will need to run it again. Is there a way to keep horizon running? Also the horizon page on my installation does not work, is this a pixelfed issue or pixelfed_ynh issue?

lapineige commented 5 years ago

So I'm guessing I am the only one running into this,

No, you're not, it is not working for me. I suppose, because if I go the the horizon page, it fails.

How do you launch horizon ? (and by the way, what is horizon ?)

StopTrackingUs commented 5 years ago

Horizon runs the jobs like creating the thumbnails on the profile pages, triggers notifications and all the good social stuff. You can trigger manually with the command:

cd /var/www/pixelfed && sudo php7.2 artisan horizon After you run the command you can watch all the things it controls. It's pretty cool.

lapineige commented 5 years ago

Thanks for the explanations.

The only message I have when running that command is : Horizon started successfully.

I still have the Whoops! Something went wrong. page in domain.tld/horizon.

StopTrackingUs commented 5 years ago

Yeah I do not have that page even after running the command, but if you wait a moment (if you have multiple people on your server you will see a lot of action. You should at least be seeing the thumbnail updates (I think).

Example: [2019-05-30 13:13:20][50] Processing: App\Jobs\StatusPipeline\NewStatusPipeline [2019-05-30 13:13:20][50] Processed: App\Jobs\StatusPipeline\NewStatusPipeline [2019-05-30 13:13:20][51] Processing: App\Jobs\StatusPipeline\StatusEntityLexer [2019-05-30 13:13:20][51] Processed: App\Jobs\StatusPipeline\StatusEntityLexer

StopTrackingUs commented 5 years ago

Just rolled this out on my server it looks like it is working.

What did I do: Create horizon.service Start Service


[unit] Description=Service for horizon in PixelFed After=network.target

[Service] Type=simple ExecStart=/usr/bin/php7.2 /var/www/pixelfed/artisan horizon Restart=on-failure

[Install] WantedBy=muilti-user.target


In Depth: ssh in to your server nano /etc/systemd/system/horizon.service Insert the above code into file, write out, exit nano sudo service horizon start sudo service horizon status (to check if it was successful)

yalh76 commented 5 years ago

OK then, there is nothing in the documentation regarding horizon but there is an issue regarding that : https://github.com/pixelfed/pixelfed/issues/1220

I will do a PR to add the horizon service :)

raphgilles commented 5 years ago

Yes. On my instance I have made this horizon.service file too.

lapineige commented 5 years ago

Ok #53 fixed that. Horizon service is running well on my server (even if it takes some amount of memory, and 15 processes right now ^^).

Still, the admin page Horizon is broken. Is it a Pixelfed issue ?

yalh76 commented 5 years ago

now solved, Horizon service implemented and Horizon page is working