Compare commits
3 Commits
57d6b1a607
...
5df9d62614
| Author | SHA1 | Date | |
|---|---|---|---|
| 5df9d62614 | |||
| 09e5435e95 | |||
| 3b28a7c400 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -54,4 +54,6 @@ htmlcov/
|
|||||||
.coverage.*
|
.coverage.*
|
||||||
.cache
|
.cache
|
||||||
coverage.xml
|
coverage.xml
|
||||||
*.cover
|
*.cover
|
||||||
|
|
||||||
|
credentials.json
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.9-slim-buster
|
FROM python:3.9-slim-bookworm
|
||||||
|
|
||||||
# Install cron
|
# Install cron
|
||||||
RUN apt-get update && apt-get -y install cron
|
RUN apt-get update && apt-get -y install cron
|
||||||
|
|||||||
2
crontab
2
crontab
@@ -1 +1 @@
|
|||||||
0 8,13,18 * * * python /app/main.py >> /var/log/cron.log 2>&1
|
0 9,13,16 * * * cd /app && /usr/local/bin/python main.py >> /var/log/cron.log 2>&1
|
||||||
|
|||||||
@@ -5,3 +5,6 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./credentials.json:/app/credentials.json:ro
|
- ./credentials.json:/app/credentials.json:ro
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Warsaw
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class GSheetAPI:
|
|||||||
except gspread.exceptions.WorksheetNotFound:
|
except gspread.exceptions.WorksheetNotFound:
|
||||||
print(f"➕ Tworzę nowy arkusz: {sheet_name}")
|
print(f"➕ Tworzę nowy arkusz: {sheet_name}")
|
||||||
ws = spreadsheet.add_worksheet(title=sheet_name, rows=100, cols=10)
|
ws = spreadsheet.add_worksheet(title=sheet_name, rows=100, cols=10)
|
||||||
ws.append_row(["#", "Link", "Nr zamówienia", "Model", "Wykończenie", "Kolor Top", "Kolor Body", "Kolor Neck", "Kolor Head", "Finish"])
|
ws.append_row(["#", "Link", "Nr zamówienia", "Model", "Wykończenie", "Kolor Top", "Kolor Body", "Kolor Neck", "Kolor Head", "Finish K/C", "Finish S"])
|
||||||
return ws
|
return ws
|
||||||
|
|
||||||
def batch_append_unique_rows(self, doc_name, sheet_name, rows_data):
|
def batch_append_unique_rows(self, doc_name, sheet_name, rows_data):
|
||||||
|
|||||||
Reference in New Issue
Block a user