Skip to content

Commit

Permalink
update scripts + cleanup worker, prepare for nwd
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Mar 20, 2024
1 parent bfbfdd4 commit 39c8caf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions apps/nocapd/src/classes/Worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export class NWWorker {
await this.after_completed( result, fail )
}


async on_success(result){
this.log.debug(`on_success(): ${result.url}`)
if(this.config?.publisher?.kinds?.includes(30066) ){
Expand All @@ -141,9 +140,7 @@ export class NWWorker {
async after_completed(result, error=false){
this.log.debug(`after_completed(): ${result.url}`)
await this.updateRelayCache( { ...result } )
await delay(100)
await this.retry.setRetries( result.url, !error )
await delay(100)
await this.setLastChecked( result.url, Date.now() )
}

Expand Down Expand Up @@ -182,7 +179,7 @@ export class NWWorker {
})
await Promise.all(expiredJobs).catch(e => this.log.debug(`drainSmart(): Promise.all(expiredJobs): Error: `, e))
}

async addRelayJobs(relays){
this.log.debug(`addRelayJobs(): for ${relays.length} relays`)
await this.drainSmart()
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"private": true,
"version": "0.0.1",
"scripts": {
"deploy:nocapd@all": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney",
"deploy:nocapd@all": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/frankfurt -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney",
"deploy:nocapd@theship": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/theship --ask-become-pass",
"deploy:nocapd@frankfurt": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/frankfurt --ask-become-pass",
"deploy:nocapd@amsterdam": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/amsterdam",
"deploy:nocapd@newyork": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/newyork",
"deploy:nocapd@johannesburg": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/johannesburg",
"nukecache@all": "ansible-playbook .ansible/nocapd/nuke-cache.yaml -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney",

"deploy:nocapd@johannesburg": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/frankfurt",
"nukecache@all": "ansible-playbook .ansible/nocapd/nuke-cache.yaml -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney"
},
"packageManager": "[email protected]^",
"devDependencies": {},
Expand Down

0 comments on commit 39c8caf

Please sign in to comment.