Either 200 or 202 is actually fine.
This commit is contained in:
parent
33eed3cedb
commit
c9ba39f820
|
|
@ -89,7 +89,9 @@ def compare_branches(last_time, this_time, url):
|
||||||
if my_hash != last_hash:
|
if my_hash != last_hash:
|
||||||
logging.debug('Branch {} has new hash.'.format(branch))
|
logging.debug('Branch {} has new hash.'.format(branch))
|
||||||
r = requests.post(url, json={"hash": my_hash})
|
r = requests.post(url, json={"hash": my_hash})
|
||||||
if r.status_code != 200:
|
if r.status_code == 200 or r.status_code == 202:
|
||||||
|
logging.debug("Request ok!")
|
||||||
|
else:
|
||||||
logging.warning("Something went wrong on request.")
|
logging.warning("Something went wrong on request.")
|
||||||
|
|
||||||
def get_config():
|
def get_config():
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ dependencies = [
|
||||||
"requests",
|
"requests",
|
||||||
"schedule"
|
"schedule"
|
||||||
]
|
]
|
||||||
version = "0.1"
|
version = "0.2"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
j7s_branch_trigger = "j7s_branch_trigger.j7s_branch_trigger:main"
|
j7s_branch_trigger = "j7s_branch_trigger.j7s_branch_trigger:main"
|
||||||
Loading…
Reference in New Issue