Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Scott Gray-3
Hi Gil,

Maybe I'm missing something but crashed jobs are reset at the same time
that they're marked as crashed (during startup). I don't have the latest
code in front of me but it used to be in JobManager.reloadCrashedJobs().
Basically when an instance restarts, any jobs marked as running are moved
to crashed and a new job is created to replace it.

If that isn't happening for you then that's the problem that needs fixing.
I'd suggest reverting this commit.

Regards
Scott



On Fri, 27 Apr 2018, 03:27 , <[hidden email]> wrote:

> Author: pgil
> Date: Thu Apr 26 15:27:50 2018
> New Revision: 1830236
>
> URL: http://svn.apache.org/viewvc?rev=1830236&view=rev
> Log:
> Implemented: Add a link onto a crashed Job to reset it
> (OFBIZ-10371)
>
> Modified:
>     ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>
> Modified:
> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml?rev=1830236&r1=1830235&r2=1830236&view=diff
>
> ==============================================================================
> --- ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> (original)
> +++ ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> Thu Apr 26 15:27:50 2018
> @@ -105,6 +105,11 @@ under the License.
>                  <parameter param-name="jobId"/>
>              </hyperlink>
>          </field>
> +        <field name="resetButton" title=" "
> use-when="'SERVICE_CRASHED'.equals(statusId)" widget-style="buttontext">
> +            <hyperlink also-hidden="false"
> description="${uiLabelMap.WebtoolsResetJob}" target="resetJob">
> +                <parameter param-name="jobId"/>
> +            </hyperlink>
> +        </field>
>      </form>
>      <form name="JobDetails" type="single">
>          <auto-fields-entity entity-name="JobSandbox" map-name="job"
> default-field-type="display"/>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Gil Portenseigne
Hello Scott,

Thanks for the review and the pointer to reloadCrashedJobs.
I decided to add a manual way to reset a crashed job since we met, in one of our
implementation, the issue that the crashed job wasn't rescheduled.
Since only a basic menu was missing to offer a way to reset it, i guess it was
no harm to commit it into trunk...

I will look for an explanation of our issue soon, to check if there is
something to fix.

Now that I understand better the crashed job mechanism, i'll revert this
commit.

Regards,

Gil


Le jeudi 26 avril 2018 à 19:33:48 (+0000), Scott Gray a écrit :

> Hi Gil,
>
> Maybe I'm missing something but crashed jobs are reset at the same time
> that they're marked as crashed (during startup). I don't have the latest
> code in front of me but it used to be in JobManager.reloadCrashedJobs().
> Basically when an instance restarts, any jobs marked as running are moved
> to crashed and a new job is created to replace it.
>
> If that isn't happening for you then that's the problem that needs fixing.
> I'd suggest reverting this commit.
>
> Regards
> Scott
>
>
>
> On Fri, 27 Apr 2018, 03:27 , <[hidden email]> wrote:
>
> > Author: pgil
> > Date: Thu Apr 26 15:27:50 2018
> > New Revision: 1830236
> >
> > URL: http://svn.apache.org/viewvc?rev=1830236&view=rev
> > Log:
> > Implemented: Add a link onto a crashed Job to reset it
> > (OFBIZ-10371)
> >
> > Modified:
> >     ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> >
> > Modified:
> > ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> > URL:
> > http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml?rev=1830236&r1=1830235&r2=1830236&view=diff
> >
> > ==============================================================================
> > --- ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> > (original)
> > +++ ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> > Thu Apr 26 15:27:50 2018
> > @@ -105,6 +105,11 @@ under the License.
> >                  <parameter param-name="jobId"/>
> >              </hyperlink>
> >          </field>
> > +        <field name="resetButton" title=" "
> > use-when="'SERVICE_CRASHED'.equals(statusId)" widget-style="buttontext">
> > +            <hyperlink also-hidden="false"
> > description="${uiLabelMap.WebtoolsResetJob}" target="resetJob">
> > +                <parameter param-name="jobId"/>
> > +            </hyperlink>
> > +        </field>
> >      </form>
> >      <form name="JobDetails" type="single">
> >          <auto-fields-entity entity-name="JobSandbox" map-name="job"
> > default-field-type="display"/>
> >
> >
> >
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Jacques Le Roux
Administrator
Hi Scott, Gil,

If I understand well, OOTB crashed jobs are only restarted at startup. So maybe adding a link to manually restart them any time makes sense?

Jacques


Le 27/04/2018 à 07:48, Gil Portenseigne a écrit :

> Hello Scott,
>
> Thanks for the review and the pointer to reloadCrashedJobs.
> I decided to add a manual way to reset a crashed job since we met, in one of our
> implementation, the issue that the crashed job wasn't rescheduled.
> Since only a basic menu was missing to offer a way to reset it, i guess it was
> no harm to commit it into trunk...
>
> I will look for an explanation of our issue soon, to check if there is
> something to fix.
>
> Now that I understand better the crashed job mechanism, i'll revert this
> commit.
>
> Regards,
>
> Gil
>
>
> Le jeudi 26 avril 2018 à 19:33:48 (+0000), Scott Gray a écrit :
>> Hi Gil,
>>
>> Maybe I'm missing something but crashed jobs are reset at the same time
>> that they're marked as crashed (during startup). I don't have the latest
>> code in front of me but it used to be in JobManager.reloadCrashedJobs().
>> Basically when an instance restarts, any jobs marked as running are moved
>> to crashed and a new job is created to replace it.
>>
>> If that isn't happening for you then that's the problem that needs fixing.
>> I'd suggest reverting this commit.
>>
>> Regards
>> Scott
>>
>>
>>
>> On Fri, 27 Apr 2018, 03:27 , <[hidden email]> wrote:
>>
>>> Author: pgil
>>> Date: Thu Apr 26 15:27:50 2018
>>> New Revision: 1830236
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1830236&view=rev
>>> Log:
>>> Implemented: Add a link onto a crashed Job to reset it
>>> (OFBIZ-10371)
>>>
>>> Modified:
>>>      ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>>
>>> Modified:
>>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml?rev=1830236&r1=1830235&r2=1830236&view=diff
>>>
>>> ==============================================================================
>>> --- ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>> (original)
>>> +++ ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>> Thu Apr 26 15:27:50 2018
>>> @@ -105,6 +105,11 @@ under the License.
>>>                   <parameter param-name="jobId"/>
>>>               </hyperlink>
>>>           </field>
>>> +        <field name="resetButton" title=" "
>>> use-when="'SERVICE_CRASHED'.equals(statusId)" widget-style="buttontext">
>>> +            <hyperlink also-hidden="false"
>>> description="${uiLabelMap.WebtoolsResetJob}" target="resetJob">
>>> +                <parameter param-name="jobId"/>
>>> +            </hyperlink>
>>> +        </field>
>>>       </form>
>>>       <form name="JobDetails" type="single">
>>>           <auto-fields-entity entity-name="JobSandbox" map-name="job"
>>> default-field-type="display"/>
>>>
>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Scott Gray-3
Hi Jacques,

A job won't even be marked as crashed until the restart. The crashed status
is a record of what happened, done in the same breath as rescheduling the
job. So if you see a crashed job in your db, then it has already been dealt
with.

Regards
Scott

On Mon, 30 Apr 2018, 21:55 Jacques Le Roux, <[hidden email]>
wrote:

> Hi Scott, Gil,
>
> If I understand well, OOTB crashed jobs are only restarted at startup. So
> maybe adding a link to manually restart them any time makes sense?
>
> Jacques
>
>
> Le 27/04/2018 à 07:48, Gil Portenseigne a écrit :
> > Hello Scott,
> >
> > Thanks for the review and the pointer to reloadCrashedJobs.
> > I decided to add a manual way to reset a crashed job since we met, in
> one of our
> > implementation, the issue that the crashed job wasn't rescheduled.
> > Since only a basic menu was missing to offer a way to reset it, i guess
> it was
> > no harm to commit it into trunk...
> >
> > I will look for an explanation of our issue soon, to check if there is
> > something to fix.
> >
> > Now that I understand better the crashed job mechanism, i'll revert this
> > commit.
> >
> > Regards,
> >
> > Gil
> >
> >
> > Le jeudi 26 avril 2018 à 19:33:48 (+0000), Scott Gray a écrit :
> >> Hi Gil,
> >>
> >> Maybe I'm missing something but crashed jobs are reset at the same time
> >> that they're marked as crashed (during startup). I don't have the latest
> >> code in front of me but it used to be in JobManager.reloadCrashedJobs().
> >> Basically when an instance restarts, any jobs marked as running are
> moved
> >> to crashed and a new job is created to replace it.
> >>
> >> If that isn't happening for you then that's the problem that needs
> fixing.
> >> I'd suggest reverting this commit.
> >>
> >> Regards
> >> Scott
> >>
> >>
> >>
> >> On Fri, 27 Apr 2018, 03:27 , <[hidden email]> wrote:
> >>
> >>> Author: pgil
> >>> Date: Thu Apr 26 15:27:50 2018
> >>> New Revision: 1830236
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=1830236&view=rev
> >>> Log:
> >>> Implemented: Add a link onto a crashed Job to reset it
> >>> (OFBIZ-10371)
> >>>
> >>> Modified:
> >>>
> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> >>>
> >>> Modified:
> >>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> >>> URL:
> >>>
> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml?rev=1830236&r1=1830235&r2=1830236&view=diff
> >>>
> >>>
> ==============================================================================
> >>> ---
> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> >>> (original)
> >>> +++
> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
> >>> Thu Apr 26 15:27:50 2018
> >>> @@ -105,6 +105,11 @@ under the License.
> >>>                   <parameter param-name="jobId"/>
> >>>               </hyperlink>
> >>>           </field>
> >>> +        <field name="resetButton" title=" "
> >>> use-when="'SERVICE_CRASHED'.equals(statusId)"
> widget-style="buttontext">
> >>> +            <hyperlink also-hidden="false"
> >>> description="${uiLabelMap.WebtoolsResetJob}" target="resetJob">
> >>> +                <parameter param-name="jobId"/>
> >>> +            </hyperlink>
> >>> +        </field>
> >>>       </form>
> >>>       <form name="JobDetails" type="single">
> >>>           <auto-fields-entity entity-name="JobSandbox" map-name="job"
> >>> default-field-type="display"/>
> >>>
> >>>
> >>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1830236 - /ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml

Jacques Le Roux
Administrator
Thanks Scott,

Now your 1st message makes totally sense

Jacques


Le 01/05/2018 à 21:53, Scott Gray a écrit :

> Hi Jacques,
>
> A job won't even be marked as crashed until the restart. The crashed status
> is a record of what happened, done in the same breath as rescheduling the
> job. So if you see a crashed job in your db, then it has already been dealt
> with.
>
> Regards
> Scott
>
> On Mon, 30 Apr 2018, 21:55 Jacques Le Roux, <[hidden email]>
> wrote:
>
>> Hi Scott, Gil,
>>
>> If I understand well, OOTB crashed jobs are only restarted at startup. So
>> maybe adding a link to manually restart them any time makes sense?
>>
>> Jacques
>>
>>
>> Le 27/04/2018 à 07:48, Gil Portenseigne a écrit :
>>> Hello Scott,
>>>
>>> Thanks for the review and the pointer to reloadCrashedJobs.
>>> I decided to add a manual way to reset a crashed job since we met, in
>> one of our
>>> implementation, the issue that the crashed job wasn't rescheduled.
>>> Since only a basic menu was missing to offer a way to reset it, i guess
>> it was
>>> no harm to commit it into trunk...
>>>
>>> I will look for an explanation of our issue soon, to check if there is
>>> something to fix.
>>>
>>> Now that I understand better the crashed job mechanism, i'll revert this
>>> commit.
>>>
>>> Regards,
>>>
>>> Gil
>>>
>>>
>>> Le jeudi 26 avril 2018 à 19:33:48 (+0000), Scott Gray a écrit :
>>>> Hi Gil,
>>>>
>>>> Maybe I'm missing something but crashed jobs are reset at the same time
>>>> that they're marked as crashed (during startup). I don't have the latest
>>>> code in front of me but it used to be in JobManager.reloadCrashedJobs().
>>>> Basically when an instance restarts, any jobs marked as running are
>> moved
>>>> to crashed and a new job is created to replace it.
>>>>
>>>> If that isn't happening for you then that's the problem that needs
>> fixing.
>>>> I'd suggest reverting this commit.
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>>
>>>>
>>>> On Fri, 27 Apr 2018, 03:27 , <[hidden email]> wrote:
>>>>
>>>>> Author: pgil
>>>>> Date: Thu Apr 26 15:27:50 2018
>>>>> New Revision: 1830236
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1830236&view=rev
>>>>> Log:
>>>>> Implemented: Add a link onto a crashed Job to reset it
>>>>> (OFBIZ-10371)
>>>>>
>>>>> Modified:
>>>>>
>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>>>> Modified:
>>>>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>>>> URL:
>>>>>
>> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml?rev=1830236&r1=1830235&r2=1830236&view=diff
>>>>>
>> ==============================================================================
>>>>> ---
>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>>>> (original)
>>>>> +++
>> ofbiz/ofbiz-framework/trunk/framework/webtools/widget/ServiceForms.xml
>>>>> Thu Apr 26 15:27:50 2018
>>>>> @@ -105,6 +105,11 @@ under the License.
>>>>>                    <parameter param-name="jobId"/>
>>>>>                </hyperlink>
>>>>>            </field>
>>>>> +        <field name="resetButton" title=" "
>>>>> use-when="'SERVICE_CRASHED'.equals(statusId)"
>> widget-style="buttontext">
>>>>> +            <hyperlink also-hidden="false"
>>>>> description="${uiLabelMap.WebtoolsResetJob}" target="resetJob">
>>>>> +                <parameter param-name="jobId"/>
>>>>> +            </hyperlink>
>>>>> +        </field>
>>>>>        </form>
>>>>>        <form name="JobDetails" type="single">
>>>>>            <auto-fields-entity entity-name="JobSandbox" map-name="job"
>>>>> default-field-type="display"/>
>>>>>
>>>>>
>>>>>
>>