
CREATE DATABASE pgtask;
\c pgtask

\i pgtask.sql

INSERT INTO Server VALUES ('pgtask', 8, 'POSTGRES');
INSERT INTO Environment VALUES ('DEV');
INSERT INTO Database VALUES ('DEV', 'pgtask', 0, 'pgtask', 'host=localhost', 'NOTICE', 'TERSE');
INSERT INTO TaskChainConfiguration VALUES ('test', 'BLOCK');

INSERT INTO Task SELECT 
  'test',
  'Task' || s,
  'select pg_sleep(random() * 10)',
  null,
  'pgtask',
  null,
  null,
  '1 hour',
  true,
  false,
  0,
  false
FROM generate_series(1,2000) s;
  

INSERT INTO TaskChainConfigurationTask SELECT 
  'test',
  'Task' || s
FROM generate_series(1,2000) s;  
  
  