Louis job scheduler (#1197)

* Adds job repo
* Adds scheduler
* Adds plugin table which is a place holder for future expansion of the scheduler. Currently all jobs that are created are linked to the pi_system plugin which are jobs that are held in a local registeredJobs map populated at controller startup.
This commit is contained in:
Louis Ruch authored and GitHub committed 2021-05-06 14:54:10 -07:00
1 parent d1d35e827c
commit feb5d7385d
40 files changed
+5445 -13

No files matched your search

@@ -0,0 +1,23 @@
begin;
create function wt_add_seconds(sec integer, ts timestamp with time zone)
returns timestamp with time zone
as $$
select ts + sec * '1 second'::interval;
$$ language sql
stable
returns null on null input;
comment on function wt_add_seconds is
'wt_add_seconds returns ts + sec.';
create function wt_add_seconds_to_now(sec integer)
returns timestamp with time zone
as $$
select wt_add_seconds(sec, current_timestamp);
$$ language sql
stable
returns null on null input;
comment on function wt_add_seconds_to_now is
'wt_add_seconds_to_now returns current_timestamp + sec.';
commit;