Skip to content

Commit

Permalink
update workflow and some minor adjustments to requests
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanu561993 committed Apr 29, 2024
1 parent 6d8bd18 commit abbf2d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Download the leaves
continue-on-error: true
run: |
pip install -r requirements.txt
python try3.py
- name: Commit the changes
continue-on-error: true
run: |
git pull origin main
git config --global user.name "GitHub Actions"
Expand Down
2 changes: 1 addition & 1 deletion httpxlib.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import httpx
import traceback
async def make_request(client:httpx.AsyncClient,method:str,url,headers=None,data=None,follow_redirects=True,json_data=None,cookies=None):
while range(1,20):
while range(1,50):
try:
response = await client.request(method, url, headers=headers, data=data, follow_redirects=follow_redirects, json=json_data, cookies=cookies,)
return response
Expand Down
3 changes: 2 additions & 1 deletion temp_worker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import httpx
import asyncio
import pickle
from httpxlib import make_request

async def get_leaves(client:httpx.AsyncClient,url: str, start: int, end: int)->dict:
print (f"Getting leaves from {start} to {end}")
response = await client.get(url=f"{url}/ct/v1/get-entries?start={start}&end={end}")
response = make_request(client=client, url=f"{url}/ct/v1/get-entries?start={start}&end={end}",method="GET")
return response.json()

async def process_worker(result:dict):
Expand Down

0 comments on commit abbf2d4

Please sign in to comment.