Skip to content

Commit

Permalink
Immediately exit on boot if past kill-date
Browse files Browse the repository at this point in the history
For #16
  • Loading branch information
mattreduce committed Feb 11, 2021
1 parent 7057cbe commit 3abc5f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Payload_Type/venus/agent_code/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const axios = require('axios').default;

const outchan = vscode.window.createOutputChannel("Venus");

const killDate = new Date('killdate');
const payloadUUID = "REPLACE_PAYLOAD_UUID"

const baseURL = new url.URL('callback_host');
Expand Down Expand Up @@ -148,6 +149,11 @@ function activate(context) {
// Build parameter is in seconds, setInterval() wants milliseconds
const interval = callback_interval * 1000

const today = new Date()
if (today > killDate) {
return
}

if (callbackUUID != null) {
setInterval(mainLoop, interval, context);
} else {
Expand Down

0 comments on commit 3abc5f3

Please sign in to comment.