Some checks failed
Gitea Actions Demo Training / Explore-Gitea-Actions (push) Failing after 9s
22 lines
502 B
Python
22 lines
502 B
Python
import time
|
|
import os
|
|
import webhook_listener
|
|
|
|
def process_post_request(request, *args, **kwargs):
|
|
print(
|
|
"Recieved request:\n"
|
|
+ "Method: {}\n".format(request.method)
|
|
+ "Body: {}\n".format(request.body)
|
|
)
|
|
|
|
# Process request here
|
|
os.system('git pull')
|
|
os.system('ls -l ..')
|
|
return
|
|
|
|
webhooks = webhook_listener.Listener(handlers={"POST": process_post_request},logScreen=False)
|
|
webhooks.start()
|
|
|
|
while True:
|
|
print("Still alive....")
|
|
time.sleep(300) |