dxs pushed to cron at dxs/learn-request-queue
- d2d99ffb02 Implement cron
- 4315d0ad7b Add ISO date to logging
- 196b5f7882 Shorten container names in docker-compose.yml
- Compare 3 commits »
dxs opened issue dxs/learn-request-queue#25
Allow manual triggering by streamer of streamer-specific cronjobsdxs commented on issue dxs/learn-request-queue#22
Implement cronjob systemUpdated version: ``` CREATE TABLE cron ( id integer GENERATED ALWAYS AS IDENTITY, name varchar NOT NULL, -- Application-recognizable name for the job runinterval interval, -- Duration between runs lastSuccess timestamptz -- Last successful run - only gets updated if run is successful ); BEGIN; -- Transaction necessary for locking SELECT * FROM cron WHERE (lastSuccess + runInterval) < now() -- Next run should be before now AND name = 'jobName' -- Application will iterate through jobs it knows about, specifying job name in query FOR UPDATE SKIP LOCKED; -- Lock row, do not include rows currently locked -- If no rows returned by select, either no pending jobs or all pending jobs are already being handled. Either way, nothing to do, so application subroutine should exit COMMIT; ``` Changes from app saying "give me a job to do" to "does this job need done?". This way, the application will never get a job it doesn't know how to handle, and will guarantee all jobs that need to get run do so in one cron cycle.
dxs commented on issue dxs/learn-request-queue#22
Implement cronjob system``` CREATE TABLE cron ( id integer GENERATED ALWAYS AS IDENTITY, name varchar NOT NULL, -- Application-recognizable name for the job runinterval interval, -- Duration between runs lastSuccess timestamptz -- Last successful run - only gets updated if run is successful ); BEGIN; -- Transaction necessary for locking SELECT * FROM cron WHERE (lastSuccess + runInterval) < now() -- Next run should be before now FOR UPDATE SKIP LOCKED LIMIT 1; -- Lock one not-already-locked row -- If no rows returned by select, either no pending jobs or all pending jobs are already being handled. Either way, nothing to do, so application subroutine should exit COMMIT; ```
dxs commented on issue dxs/learn-request-queue#22
Implement cronjob systemFunctions that need this: - Bans - Updating empty metadata - Retrieving followers and subscribers
dxs pushed to master at dxs/learn-request-queue
- ef8f2312fe Add prod dockerfile
- 1e78a52605 Add prod dockerfile
- Compare 2 commits »
dxs pushed to master at dxs/learn-request-queue
- 1e78a52605 Add prod dockerfile
dxs pushed to master at dxs/learn-request-queue
- 62fbf179a6 Bump version to 0.2.1
- 77890ec1ad Make streamer name and profile picture in navbar link to twitch page
- Compare 2 commits »
dxs deleted tag v0.2.0 from dxs/learn-request-queue
dxs deleted tag v0.1.0 from dxs/learn-request-queue
dxs pushed tag v0.2.1 to dxs/learn-request-queue
dxs pushed tag v0.2.0 to dxs/learn-request-queue
dxs pushed tag v0.1.0 to dxs/learn-request-queue
dxs closed issue dxs/learn-request-queue#23
/api/getAllRequests fails when not logged indxs pushed to master at dxs/learn-request-queue
- 98dab2dd66 Fix queries.getAllRequests calling requests_vw as a function
dxs opened issue dxs/learn-request-queue#23
/api/getAllRequests fails when not logged indxs pushed to master at dxs/learn-request-queue
- 48c5b46343 Add v0.1-v0.2.sql upgrade script
- 742089e96c Add v0.1-v0.2.sql upgrade script
- Compare 2 commits »
dxs deleted branch temp-jenn from dxs/learn-request-queue