Upload benchmark graphs to ticket range subfolders
Partially addresses issue #22
This commit is contained in:
parent
6320533f86
commit
9bcb0bdb32
1 changed files with 2 additions and 1 deletions
|
|
@ -200,6 +200,7 @@ def upload_to_imgur(image_path):
|
|||
def upload_to_nextcloud(image_path, ticket_number, dev_name):
|
||||
"""Upload image to Nextcloud server and return folder url as str."""
|
||||
image_data = None
|
||||
ticket_range = f'{ticket_number[:3]}00-{ticket_number[:3]}99'
|
||||
|
||||
# Bail early
|
||||
if not image_path:
|
||||
|
|
@ -212,7 +213,7 @@ def upload_to_nextcloud(image_path, ticket_number, dev_name):
|
|||
# PUT image
|
||||
url = (
|
||||
f'{BENCHMARK_SERVER["Url"]}/'
|
||||
f'{ticket_number}_iobenchmark'
|
||||
f'{ticket_range}/{ticket_number}_iobenchmark'
|
||||
f'_{dev_name}_{time.strftime("%Y-%m-%d_%H%M_%z")}.png'
|
||||
)
|
||||
requests.put(
|
||||
|
|
|
|||
Loading…
Reference in a new issue