Task #7423

Make job scheduling workers AtoM instance specific

Added by Mike Gale over 7 years ago. Updated over 7 years ago.

Status:VerifiedStart date:10/21/2014
Priority:HighDue date:
Assignee:Mike Gale% Done:

90%

Category:Job scheduling
Target version:Release 2.2.0
Google Code Legacy ID: Tested version:2.2
Sponsored:No Requires documentation:

Description

I didn't really think about this until we were going to deploy a test site with the job scheduler. Basically, what happens if there are multiple AtoM installs on a single machine that all use job scheduling? It doesn't make sense to share workers between them (they may have different versions of jobs, some might have jobs that are client specific, we don't want data sharing, etc.).

Currently, if we tried this any AtoM install's worker will accept any AtoM install's job requests. This will cause things to break, in some cases very badly. We need to make it so each worker process is tied to its AtoM install only.


Related issues

Related to Access to Memory (AtoM) - Bug #9648: Gearman job names are not compatible with the memcached b... Verified 04/01/2016

History

#1 Updated by Mike Gale over 7 years ago

Unfortunately I'm not seeing an easy way to accomplish this. The only solution I can think of which is a bit hacky but would work, would be to broadcast abilities with the AtoM folder path pre-appended to the ability name. e.g. "/var/www/atom_a - arMyJob" & "/var/www/atom_b - arMyJob", and then that way only workers spawned from the appropriate AtoM installs will be able to 'accept' jobs for it.

Then, when the job is about to run, strip out the prefix here: https://github.com/artefactual/client-sfu-atom/blob/qa/2.2.x/vendor/net_gearman/Net/Gearman/Worker.php#L347

#2 Updated by Mike Gale over 7 years ago

I put the solution on a topic branch, will test it more thoroughly tomorrow and merge into the qa/2.2.x branch after the SFU test site is deployed.

#3 Updated by Mike Gale over 7 years ago

  • Status changed from New to In progress
  • % Done changed from 0 to 90

#4 Updated by Mike Gale over 7 years ago

  • Status changed from In progress to Verified

#5 Updated by Jesús García Crespo about 6 years ago

  • Related to Bug #9648: Gearman job names are not compatible with the memcached backend added

Also available in: Atom PDF