Subject: | TheSchwartz::ExitStatus |
Date: | Tue, 25 Jan 2011 09:46:22 +0100 |
To: | bug-TheSchwartz [...] rt.cpan.org |
From: | "Nicolas Franck" <Nicolas.Franck [...] UGent.be> |
Hi my name is Nicolas Franck.
This is my system:
Ubuntu 10.04 LTS 64-bit
version of TheSchwartz: 1.10
version of perl 5.10.1
the code is supplied in the attachments
Explaining:
My code consist of 3 parts:
- daemon with the ability 'TheSchwartz::Worker::Download'
- the worker 'TheSchwartz::Worker::Download' itself
- client code that insert job into the database by means of the api
Problem:
As long as the method 'keep_exit_status_for' in the worker is set
as '0', everything works just fine. The method 'grab_for' is set to
1 in order to debug fast, and 'max_retries' to 0. But if I try to
increase the number of 'keep_exit_status_for', the following error
appears in the daemon:
TheSchwartz::work_once got job of class 'TheSchwartz::Worker::Download'
Working on TheSchwartz::Worker::Download ...
Eval failure: Failed to execute INSERT INTO exitstatus
(jobid, status, funcid, completion_time, delete_after)
VALUES (?, ?, ?, ?, ?)
with jobid, status, funcid, completion_time, delete_after:
DBD::mysql::st execute failed: Duplicate entry '1' for key 'PRIMARY'
at /usr/local/share/perl/5.10.1/Data/ObjectDriver/Driver/DBI.pm line
393.
job failed. considering retry. is max_retries of 0 >= failures of 1?
job failed: Failed to execute INSERT INTO exitstatus
(jobid, status, funcid, completion_time, delete_after)
VALUES (?, ?, ?, ?, ?)
with jobid, status, funcid, completion_time, delete_after:
DBD::mysql::st execute failed: Duplicate entry '1' for key 'PRIMARY'
at /usr/local/share/perl/5.10.1/Data/ObjectDriver/Driver/DBI.pm line
393.
Failed to execute INSERT INTO exitstatus
(jobid, status, funcid, completion_time, delete_after)
VALUES (?, ?, ?, ?, ?)
with jobid, status, funcid, completion_time, delete_after:
DBD::mysql::st execute failed: Duplicate entry '1' for key 'PRIMARY'
at /usr/local/share/perl/5.10.1/Data/ObjectDriver/Driver/DBI.pm line
393.
It's appears that the entry in the table 'exitstatus' was already inserted
before exiting (while it should only do that after the exit).
Any bright idea's on how to fix this?
Thanks in advance,
Nicolas Franck
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.