Skip to content

Commit

Permalink
[batch] Get rid of default standing workers in dev (#12202)
Browse files Browse the repository at this point in the history
* [batch] Get rid of default standing workers in dev

* fixes
  • Loading branch information
jigold authored Sep 21, 2022
1 parent e03edd4 commit 6ce0317
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions batch/sql/no_dev_standing_workers_by_default.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import asyncio
from gear import Database


async def main():
if os.environ['HAIL_SCOPE'] != 'dev':
return

db = Database()
await db.async_init()

await db.execute_update(
'''
UPDATE pools
SET enable_standing_worker = 0
'''
)


loop = asyncio.get_event_loop()
loop.run_until_complete(main())
3 changes: 3 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,9 @@ steps:
- name: add-jobs-update-id-index
script: /io/sql/add-jobs-update-id-index.sql
online: true
- name: no-dev-standing-workers-by-default
script: /io/sql/no_dev_standing_workers_by_default.py
online: true
inputs:
- from: /repo/batch/sql
to: /io/sql
Expand Down

0 comments on commit 6ce0317

Please sign in to comment.