Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accounting hook in infinite look #2

Open
kreczko opened this issue Jul 5, 2019 · 1 comment
Open

Accounting hook in infinite look #2

kreczko opened this issue Jul 5, 2019 · 1 comment

Comments

@kreczko
Copy link
Member

kreczko commented Jul 5, 2019

It seems that at the moment, the accounting hook will apply itself every job router iteration even on jobs that it has been applied to.

To avoid this, there are two ways around:

  1. add requirements = (AcctGroupUser == Undefined) or similar to the JobRouter entry
  2. add set_AppliedAccountingHook = True and set `requirements = (target.AppliedAccountingHook isnt True) to the JobRouter entry
@kreczko
Copy link
Member Author

kreczko commented Jul 5, 2019

The 2nd option seems to work nicely.

diff --git a/files/30_job_router.config b/files/30_job_router.config
index db077c8..5556c98 100644
--- a/files/30_job_router.config
+++ b/files/30_job_router.config
@@ -14,11 +14,13 @@ JOB_ROUTER_POLLING_PERIOD = 10
 
 JOB_ROUTER_ENTRIES = [ \
     name = "Add accounting information to jobs";\
+    requirements = (AppliedAccountingHook isnt True); \
     GridResource = "NONE"; \
     OverrideRoutingEntry = True; \
     TargetUniverse = 5;\
     set_ACCOUNTING_Route = True; \
     set_HookKeyword = "ACCOUNTING"; \
+    set_AppliedAccountingHook = True; \
 ]
 
 MAX_HISTORY_ROTATIONS = 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant