Skip to content

On demand feature in pg_timetable #478

Closed Answered by pashagolub
ashx1901 asked this question in Q&A
Discussion options

You must be logged in to vote

One can start any chain on demand and stop any running chain. There are two functions available:

  • timetable.notify_chain_start( chain_id BIGINT, worker_name TEXT )
  • timetable.notify_chain_stop( chain_id BIGINT, worker_name TEXT )

So the algorithm is:

  1. Make sure pg_timetable is running with a proper client name, e.g. --clientname=worker01
  2. Connect to the target database with the preferred client, e.g. psql -d timetable -h localhost -U scheduler
  3. Inspect what chain needs to be run, e.g., SELECT * FROM timetable.chain
  4. Execute the function to send the chain to the worker, e.g., SELECT timetable.notify_chain_start(42, 'worker01')
  5. Check the logs for the chain output

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ashx1901
Comment options

Comment options

You must be logged in to vote
1 reply
@ashx1901
Comment options

Answer selected by pashagolub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
📖 documentation Good for newcomers ❓ question Further information is requested
2 participants