mojolicious / minion

:octopus: Perl high performance job queue
https://metacpan.org/release/Minion
Artistic License 2.0
221 stars 55 forks source link

linkcheck doesn't work - links never checked #124

Closed hussam-qasem closed 1 year ago

hussam-qasem commented 1 year ago

Steps to reproduce the behavior

  1. Start a Postgres Database

    docker run --rm --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:15.2
  2. start linkcheck Mojo App.

    git clone https://github.com/mojolicious/minion/
    cd minion/examples/linkcheck/
    morbo script/linkcheck
  3. Check the default URL (POST)

    curl -X POST -F url=https://mojolicious.org/perldoc http://127.0.0.1:3000/links
  4. Wait for results (GET)

    for i in $(seq 1 10); do curl http://localhost:3000/links/1; sleep 3; done

Expected behavior

Result should return

Actual behavior

Result never returned. LinkCheck::Task::CheckLinks::_check_links never called.

Test fails

TEST_ONLINE=postgresql://postgres@127.0.0.1:5432/postgres script/linkcheck test

Unknown command "test", maybe you need to install it?
hussam-qasem commented 1 year ago

I am sorry. I forgot to run a worker:

perl script/linkcheck minion worker

In docker environment, should the worker be running in a separate container though?

kraih commented 1 year ago

In docker environment, should the worker be running in a separate container though?

Yes.

hussam-qasem commented 1 year ago

Thank you @kraih for the prompt response. I'm still unable to run the tests though:

TEST_ONLINE=postgresql://postgres@127.0.0.1:5432/postgres script/linkcheck test
kraih commented 1 year ago
...script/linkcheck test

I have no idea what that is.

hussam-qasem commented 1 year ago
...script/linkcheck test

I have no idea what that is.

From the test file. I thought it was possible, other than prove -lv. Thank you!