Skip Menu |
 

This queue is for tickets about the TheSchwartz CPAN distribution.

Report information
The Basics
Id: 60797
Status: resolved
Priority: 0/
Queue: TheSchwartz

People
Owner: Jeff.Fearn [...] gmail.com
Requestors: dmichellis [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.11



From dmichellis [...] yahoo.com Fri Aug 27 09: 24:36 2010
MIME-Version: 1.0
X-Ymail-Osg: jV08ECMVM1nD2yne1YSLaEdp3OxUqrdfIPp_8ZNukP4LNEX NNnAJrj90dHKQRUpP.yW_wSLGmLULFx_0BNy6hImsYDrXs0gBxKwbBW.8LKn 1EI32422ec8Edt0eUIfHVMGXl4XYhqwvn4ezN1ooq.kPOTHzJbijaC8ccX_H tapxdwW1lQPkzvrNRxcRATXfVgZsPI6bmO69dMN9rvk7yMUqjKS8S0lgoUP9 X6BwpnLE6hJp3MwYaBgeFaj7I82QJXP5NvDrk90MfLDpOctnwBNW7Acg1_uw eonJNnSXIs2lTug2z2X.K9F4sREx__kuAFTj17.ewmNOA2PW3X74S5w--
X-Spam-Status: No, score=-10.599 tagged_above=-99.9 required=10 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8] autolearn=ham
X-Mailer: YahooMailClassic/11.3.2 YahooMailWebService/0.8.105.279950
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -10.599
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 0B7F6240B95 for <cpan-bug+TheSchwartz [...] hipster.bestpractical.com>; Fri, 27 Aug 2010 09:24:36 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WTtlOpSs+JZx for <cpan-bug+TheSchwartz [...] hipster.bestpractical.com>; Fri, 27 Aug 2010 09:24:34 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2842F240AEE for <bug-TheSchwartz [...] rt.cpan.org>; Fri, 27 Aug 2010 09:24:33 -0400 (EDT)
Received: (qmail 9191 invoked by uid 103); 27 Aug 2010 13:27:07 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 27 Aug 2010 13:27:07 -0000
Received: from web36204.mail.mud.yahoo.com (HELO web36204.mail.mud.yahoo.com) (209.191.68.230) by 16.mx.develooper.com (qpsmtpd/0.80) with SMTP; Fri, 27 Aug 2010 06:27:07 -0700
Received: (qmail 83316 invoked by uid 60001); 27 Aug 2010 13:27:02 -0000
Received: from [200.221.129.3] by web36204.mail.mud.yahoo.com via HTTP; Fri, 27 Aug 2010 06:27:02 PDT
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] yahoo.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=dmichellis [...] yahoo.com
Delivered-To: cpan-bug+TheSchwartz [...] hipster.bestpractical.com
Subject: $job->declined() should allow a timestamp/timeout
Return-Path: <dmichellis [...] yahoo.com>
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0pTFfkWauzHcGi62q2ab+U0vnpqqhv30/SH52/4RHKZMFT6NsuMUVaDzIXAqQjNb0Uuca9qK6rJf/jy11QHOZw0KOSnliUaoJbuO2e1DSGsbUfyAZvsCd1VmtbPjM6ItwLwauIe8b2mr0azCaki0VlZZRtR0c/JgxyY2dH0AZq4=;
X-RT-Mail-Extension: theschwartz
X-Original-To: cpan-bug+TheSchwartz [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1282915622; bh=uDGLX8RBChoT9M6fM+0YOHKJI45rChB1fcA0TmR8K+Y=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Wamg3BYRXRGyCVu8sp2tPuUFuTzlImMo0/aQs4AJsjVCxpU9CJ5QqS8YBSWfuTeCQkYYuoLycjUSwUJR0yp+NvpxjWMjcX/LDh7qgH67S9PQaVn1c0w9MsmdnDyybclX6nAi7R4Mr6xTkhLvlDrd+i/zGR5AmVZ15rC2SZIKIkg=
Date: Fri, 27 Aug 2010 06:27:02 -0700 (PDT)
X-Spam-Level:
To: bug-TheSchwartz [...] rt.cpan.org
From: Deives Michellis <dmichellis [...] yahoo.com>
X-RT-Original-Encoding: us-ascii
Content-Length: 564
Download (untitled) / with headers
text/plain 564b
When declining a job, we could/should be able to say for how long the system should wait before trying it again. Waiting for one full hour is not very nice :( Currently, the only way I figured out is: $job->grabbed_until(time() + rand(5)); $job->declined(); $job->driver->update($job); Having to manually call grabbed_until and then an update on the database doesnt seem the best way to handle this. "declined" should do it for us, no? If there are proper ways to achieve such behaviour, please let me now. Thank you, and great job with TheSchwartz!
MIME-Version: 1.0
In-Reply-To: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24120-1414545846-1647.60797-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 776
Download (untitled) / with headers
text/plain 776b
On Fri Aug 27 23:27:11 2010, dmichellis@yahoo.com wrote: Show quoted text
> When declining a job, we could/should be able to say for how long the > system should wait before trying it again. Waiting for one full hour > is not very nice :( > > Currently, the only way I figured out is: > > $job->grabbed_until(time() + rand(5)); > $job->declined(); > $job->driver->update($job); > > Having to manually call grabbed_until and then an update on the > database doesnt seem the best way to handle this. "declined" should do > it for us, no? > > If there are proper ways to achieve such behaviour, please let me now. > > Thank you, and great job with TheSchwartz! > > >
Hi, worker classes can override sub grab_for which is used to set the wait time, is this not sufficient? Cheers, Jeff.
MIME-Version: 1.0
In-Reply-To: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-29909-1414642138-554.60797-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 576
Download (untitled) / with headers
text/plain 576b
After thinking about this I came to the conclusion that it would be nice to be able to have different behaviour between grab_for and decline. e.g. This would be handy where jobs take a long time to run, so you need a long grab_for, but you want to recheck declined jobs more often. Aded a prameter to declined that sets run_after to the supplied time, resets grab_for, updates job in DB. e.g. This has not changed: $job->declined(); This updates job & DB: $job->declined( time() + 2 ); To git@github.com:jfearn/TheSchwartz.git b83765d..ad065ca master -> master
MIME-Version: 1.0
In-Reply-To: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <467096.72581.qm [...] web36204.mail.mud.yahoo.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-25960-1414996088-522.60797-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 45
A fix for this issue shipped in Version 1.11.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.