Thibault Goehringer
commited on
Commit
·
fd0663e
1
Parent(s):
d512690
Test permissions
Browse files- Dockerfile +3 -0
- main.py +2 -2
Dockerfile
CHANGED
@@ -27,4 +27,7 @@ RUN --mount=type=secret,id=access_token_secret,mode=0444,required=true \
|
|
27 |
RUN --mount=type=secret,id=bearer_token,mode=0444,required=true \
|
28 |
cat /run/secrets/bearer_token > /test
|
29 |
|
|
|
|
|
|
|
30 |
CMD ["python", "main.py"]
|
|
|
27 |
RUN --mount=type=secret,id=bearer_token,mode=0444,required=true \
|
28 |
cat /run/secrets/bearer_token > /test
|
29 |
|
30 |
+
RUN mkdir -p /code/data
|
31 |
+
RUN chmod 777 /code/data
|
32 |
+
|
33 |
CMD ["python", "main.py"]
|
main.py
CHANGED
@@ -74,7 +74,7 @@ def toast(text):
|
|
74 |
|
75 |
|
76 |
def reply_to_mentions():
|
77 |
-
since_id = get_last_tweet("last_id.txt")
|
78 |
mentions = client.get_users_mentions(
|
79 |
id=1612106815096999936,
|
80 |
since_id=since_id,
|
@@ -118,7 +118,7 @@ def reply_to_mentions():
|
|
118 |
logger.error(e)
|
119 |
continue
|
120 |
|
121 |
-
put_last_tweet("last_id.txt", mention.id)
|
122 |
|
123 |
|
124 |
def main():
|
|
|
74 |
|
75 |
|
76 |
def reply_to_mentions():
|
77 |
+
since_id = get_last_tweet("data/last_id.txt")
|
78 |
mentions = client.get_users_mentions(
|
79 |
id=1612106815096999936,
|
80 |
since_id=since_id,
|
|
|
118 |
logger.error(e)
|
119 |
continue
|
120 |
|
121 |
+
put_last_tweet("data/last_id.txt", mention.id)
|
122 |
|
123 |
|
124 |
def main():
|