Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6790

Add service blackout period on job mananger

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: framework
    • Labels:
      None

      Description

      On the job manager, we haven't the possibility to informe an ofbiz instance that we want stop all job queue for a define duration.
      We can have a multipe reason for that : server maintenance, surcharge, business problem ...

      I created a draft to give an idea with added a new entity JobManagerSemaphore. When the job manager analyze if a semaphore lock him or not. If it's not the case, it continue the process to load the poll.

      I root for any comments on this draft to find the most attractive solution

      1. OFBIZ-6790.patch
        30 kB
        Nicolas Malin
      2. OFBIZ-6790.patch
        27 kB
        Jacques Le Roux
      3. OFBIZ-6790.patch
        27 kB
        Nicolas Malin
      4. OFBIZ-6790.patch
        17 kB
        Nicolas Malin
      5. OFBIZ-6790.patch
        17 kB
        Nicolas Malin
      6. OFBIZ-6790-branch1307-1412-1512.patch
        30 kB
        Nicolas Malin

        Issue Links

          Activity

          Hide
          soledad Nicolas Malin added a comment -

          No remark on this issue ?

          I push to trunk and revert if isn't good ?

          Show
          soledad Nicolas Malin added a comment - No remark on this issue ? I push to trunk and revert if isn't good ?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Sorry Nicolas, I did not notice (mark to review later) this issue so did not review the patch yet. Could you wait until next weekend?

          Show
          jacques.le.roux Jacques Le Roux added a comment - Sorry Nicolas, I did not notice (mark to review later) this issue so did not review the patch yet. Could you wait until next weekend?
          Hide
          soledad Nicolas Malin added a comment -

          No problem, I'm happy to wait

          Show
          soledad Nicolas Malin added a comment - No problem, I'm happy to wait
          Hide
          soledad Nicolas Malin added a comment -

          I reload the patch without blank line, it's a draft but no reason to load bad code !

          Show
          soledad Nicolas Malin added a comment - I reload the patch without blank line, it's a draft but no reason to load bad code !
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I made a quick review, sounds good to me, not sure the best word in UI is semaphore, "jobs blocker" maybe?

          I just tried, after loading the data, seems to work (did not get further).

          Have you planned to put a warning message in FindJob screen? To warn users the jobs are blocked ...from...to...

          Show
          jacques.le.roux Jacques Le Roux added a comment - I made a quick review, sounds good to me, not sure the best word in UI is semaphore, "jobs blocker" maybe? I just tried, after loading the data, seems to work (did not get further). Have you planned to put a warning message in FindJob screen? To warn users the jobs are blocked ...from...to...
          Hide
          soledad Nicolas Malin added a comment -

          Thanks jacques, for the name JobManagerSemaphore I hesitated with JobManagerLock.

          It's a good idea to alert the user on FindJob screen, and more we can alert for the next lock start. I will update the code.

          Show
          soledad Nicolas Malin added a comment - Thanks jacques, for the name JobManagerSemaphore I hesitated with JobManagerLock. It's a good idea to alert the user on FindJob screen, and more we can alert for the next lock start. I will update the code.
          Hide
          soledad Nicolas Malin added a comment -

          Jacques, I added a new include screen to display the enable jobManagerLock on FindJob and scheduleJob screen.

          With your remark I added also on the entity who create the lock and why. Now we can explain why the job manager is locked

          Show
          soledad Nicolas Malin added a comment - Jacques, I added a new include screen to display the enable jobManagerLock on FindJob and scheduleJob screen. With your remark I added also on the entity who create the lock and why. Now we can explain why the job manager is locked
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          That's a good idea Nicolas, should we not introduce a specific permission for that, apart the admin?
          I guess not, adding specific roles should be custom application specific, I presume.

          I just tested it (only the UI, not the functionallity, I guess it's OK), well down, I like it!

          I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options). Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)? I will also review the English labels and post and updated patch

          Thanks!

          Show
          jacques.le.roux Jacques Le Roux added a comment - That's a good idea Nicolas, should we not introduce a specific permission for that, apart the admin? I guess not, adding specific roles should be custom application specific, I presume. I just tested it (only the UI, not the functionallity, I guess it's OK), well down, I like it! I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options). Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)? I will also review the English labels and post and updated patch Thanks!
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Yikes, a typo in previous file :/

          Show
          jacques.le.roux Jacques Le Roux added a comment - Yikes, a typo in previous file :/
          Hide
          soledad Nicolas Malin added a comment -

          nice,

          I will think about the permission, yes good idea.

          Show
          soledad Nicolas Malin added a comment - nice, I will think about the permission, yes good idea.
          Hide
          soledad Nicolas Malin added a comment -

          I think we can create a new permission 'SERVICE_JOB_MG_LOCK' and check this permission on each call to add or edit the lock

          Show
          soledad Nicolas Malin added a comment - I think we can create a new permission 'SERVICE_JOB_MG_LOCK' and check this permission on each call to add or edit the lock
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Yes and the admin/s would have it.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Yes and the admin/s would have it.
          Hide
          soledad Nicolas Malin added a comment -

          And the new version with security permission

          Show
          soledad Nicolas Malin added a comment - And the new version with security permission
          Hide
          soledad Nicolas Malin added a comment -

          I think this version is ready to push on trunk, after that I'm sure that other remarks will come and it's fine

          I will try to realize this tomorrow

          Show
          soledad Nicolas Malin added a comment - I think this version is ready to push on trunk, after that I'm sure that other remarks will come and it's fine I will try to realize this tomorrow
          Hide
          soledad Nicolas Malin added a comment -

          Ok I commited on trunk at revision 1727570.

          Thanks !

          Show
          soledad Nicolas Malin added a comment - Ok I commited on trunk at revision 1727570. Thanks !
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          I like it, just like I said in previous comment

          I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options).

          This because if you have a long list you need to scroll down. Having it on top guarantees it's always visible

          Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)?

          So a link from the list seems appropriate (field "Instance Id")

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited I like it, just like I said in previous comment I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options). This because if you have a long list you need to scroll down. Having it on top guarantees it's always visible Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)? So a link from the list seems appropriate (field "Instance Id")
          Hide
          soledad Nicolas Malin added a comment -

          If some people want use this improvement on branch 1307, 1412 or 1512, I create a backport patch.

          Show
          soledad Nicolas Malin added a comment - If some people want use this improvement on branch 1307, 1412 or 1512, I create a backport patch.
          Hide
          soledad Nicolas Malin added a comment - - edited

          I like it, just like I said in previous comment
          I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options).

          Yes I did it

          Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)?

          I doubt, I use you last patch with your correction. .... Ok I check

          Show
          soledad Nicolas Malin added a comment - - edited I like it, just like I said in previous comment I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options). Yes I did it Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)? I doubt, I use you last patch with your correction. .... Ok I check
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          >I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options).

          Ha yes I see it now Not sure what happened, maybe a cache issue...

          Show
          jacques.le.roux Jacques Le Roux added a comment - >I'd just put the "Job manager locks enabled" at top of the "Job List" (before the search options). Ha yes I see it now Not sure what happened, maybe a cache issue...
          Hide
          soledad Nicolas Malin added a comment - - edited

          I confirm, the labels came from you patch https://issues.apache.org/jira/secure/attachment/12783933/OFBIZ-6790.patch
          However I misunderstand when you said :

          Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)?

          With the changing "Through Date" I keep in mind "we can't cancel from Job List" ... It's my bad, I open a linked issue to complete this

          Show
          soledad Nicolas Malin added a comment - - edited I confirm, the labels came from you patch https://issues.apache.org/jira/secure/attachment/12783933/OFBIZ-6790.patch However I misunderstand when you said : Also should we not be able to edit a lock (changing "Through Date" for instance, etc.)? With the changing "Through Date" I keep in mind " we can't cancel from Job List " ... It's my bad, I open a linked issue to complete this
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          OK so we can't edit a lock. We need to cancel and re-create it, maybe not a big deal...

          Show
          jacques.le.roux Jacques Le Roux added a comment - OK so we can't edit a lock. We need to cancel and re-create it, maybe not a big deal...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          OK Got it, I just cross-posted below

          Show
          jacques.le.roux Jacques Le Roux added a comment - OK Got it, I just cross-posted below

            People

            • Assignee:
              soledad Nicolas Malin
              Reporter:
              soledad Nicolas Malin
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development