mojolicious / minion

:octopus: Perl high performance job queue

Home Page:https://metacpan.org/release/Minion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minion::Admin can not remove retry inactive task

ggmo opened this issue · comments

commented

Minion::Admin can not remove retry inactive task

  • Minion version: 10.04
  • Perl version: 5.26.3 (activePerl linux)
  • Operating system: centos 8
    *Psql (PostgreSQL) 10.6

Steps to reproduce the behavior

1、./manager minion job --remove 62 with CMD can remove the task , but with the web console can not remove tasks, also the chrome devtools can not get error info
2、web console can get data from pg, also execute the task with mojo;

plz help fix the bug

commented

web requestion info

http://192.168.100.108:8002/minion/jobs?do=remove&id=63

but the minion server not respond

Deleting jobs from the admin ui works fine. I don't see any bugs.

commented

https://metacpan.org/source/SRI/Minion-10.04/lib/Minion/Backend/Pg.pm

Is it possible to have something to do with this code ?
1、sub remove_job {
!!shift->pg->db->query(
"delete from minion_jobs
where id = ? and state in ('inactive', 'failed', 'finished')
returning 1", shift
)->rows;
}

2、when i use restful api debugger , warn 404

METHOD : PATCH
http://192.168.100.108:8002/minion/jobs?do=remove&id=63

Date: Wed, 19 Feb 2020 10:25:51 GMT
Access-Control-Allow-Origin: http://192.168.100.100:8088
Access-Control-Allow-Credentials: true
Content-Type: text/html;charset=UTF-8
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS, PATCH
Server: Mojolicious (Perl)
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Authorization , Access-Control-Request-Headers
Content-Length: 25 kilobytes
commented

I have uninstalled Mojo :: Pg Minion Mojolicious and reinstalled it, but I still can only receive jobs but cannot delete it. Pause Reopen inactive JOB, please give some advice ,many thanks!!!

commented

Some exceptions were found through the command line minion work --remove job

[2020-02-19 18:41:33.22526] [19871] [info] Creating Routes for resource 'Device' (controller => Device)
[2020-02-19 18:41:33.22547] [19871] [debug] OPTIONS /mojo/devices (api_options)
[2020-02-19 18:41:33.22559] [19871] [debug] GET /mojo/devices (api_get)
[2020-02-19 18:41:33.22569] [19871] [debug] POST /mojo/devices (api_create)
[2020-02-19 18:41:33.22578] [19871] [debug] DELETE /mojo/devices/ (api_delete)
[2020-02-19 18:41:33.22592] [19871] [debug] PUT /mojo/devices/ (api_update)
[2020-02-19 18:41:33.22619] [19871] [debug] GET /mojo/devices/download (api_download)
[2020-02-19 18:41:33.22647] [19871] [info] Creating Routes for resource 'Firewall' (controller => Firewall)
[2020-02-19 18:41:33.22673] [19871] [debug] OPTIONS /mojo/firewalls (api_options)
[2020-02-19 18:41:33.22693] [19871] [debug] GET /mojo/firewalls (api_get)
[2020-02-19 18:41:33.22709] [19871] [debug] POST /mojo/firewalls (api_create)
[2020-02-19 18:41:33.22724] [19871] [debug] DELETE /mojo/firewalls/ (api_delete)
[2020-02-19 18:41:33.22734] [19871] [debug] PUT /mojo/firewalls/ (api_update)
[2020-02-19 18:41:33.22749] [19871] [debug] GET /mojo/firewalls/download (api_download)
Job does not exist.
[root@careline script]# ./firewall_manager minion job --remove 78
**###

  • Odd number of elements in anonymous hash at (eval 90) line 2.

**

I double checked to make sure, and there is absolutely no problem removing inactive jobs with the admin ui.