0

We have a production environment (cluster) where there are two physical servers and 3 (three) plone/zope instances running inside each one.

We scheduled a job (with apscheduler) that needs to run only in a unique instance, but is executing by all 6 (six) instances.

To solve this, I think I need to verify if the job is running in the server1 and if it is a instance that listens on a specific port.

So, how to get programmaticly informations about a zope/plone instance?

Leonardo Andrade
  • 2,508
  • 2
  • 18
  • 24
  • 1
    Why can't you use a dedicated instance for that job, one for every node? – keul Dec 16 '13 at 11:14
  • We have automatic replication between nodes. So, I don't know how to create a apscheduler job that run in just one plone instance. The database is shared between all the instances, and we decide to use a db lock (update_nowait). – Leonardo Andrade Dec 19 '13 at 15:05
  • Let me understand (sorry I've no real knowledge about apscheduler). Is apscheduler job configured inside the instance or it's a totally external process? In the first case: you can simply define a different configuration for (let call it this way) instance-scheduler, while instance1, instance2... are normal Plone instances. – keul Dec 21 '13 at 10:39
  • Hi, @keul. apscheduler job is configured inside the instance, actually, in the code of our plone product. The same product is playing in all instances. So, each instance executes the job independently [6 times (one by each instance)] and this behaviour is not desired. I don't found a "cluster mode" in apscheduler to avoid this and we decided to use a db lock. – Leonardo Andrade Dec 23 '13 at 17:35

0 Answers0